Skip to content

Instantly share code, notes, and snippets.

{ runCommand, fetchzip, cabal2nix }:
let
package-src = runCommand "package-src" {
src = fetchzip {
url = "...zip";
sha256 = "...";
};
buildInputs = [ cabal2nix ];
}
''
@dmjio
dmjio / 0_reuse_code.js
Created March 19, 2017 10:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
{ pkgs ? import <nixpkgs> {}}:
let
texpkgs = pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-small latexmk;
};
in
pkgs.stdenv.mkDerivation {
name = "mbd";
{ pkgs ? import <nixpkgs> {}}:
let
texpkgs = pkgs.texlive.combine {
inherit (pkgs.texlive) scheme-small latexmk;
};
in
pkgs.stdenv.mkDerivation {
name = "mbd";
@dmjio
dmjio / default.nix
Created April 12, 2017 04:05 — forked from adnelson/default.nix
Nix release builder
# Function which takes a list of packages to install and creates a
# tarball which contains the full list of dependencies of those paths,
# and a script which will install them.
#
# For example, here's how you would create a tarball packaging up
# python3 and nodejs:
#
#
# let
# pkgs = import <nixpkgs> {};
@dmjio
dmjio / Foo.hs
Created May 10, 2020 02:57 — forked from Lysxia/Foo.hs
{-# LANGUAGE
DeriveGeneric,
FlexibleInstances,
FlexibleContexts,
AllowAmbiguousTypes,
ScopedTypeVariables,
TypeApplications,
TypeFamilies,
TypeOperators,
PartialTypeSignatures,
@dmjio
dmjio / rbt.hs
Created October 9, 2022 19:18 — forked from abiodun0/rbt.hs
Red black tree, Haskell
module RedBlackTree
(
Tree,
empty,
member,
insert)
where
data Color = R | B deriving Show