Skip to content

Instantly share code, notes, and snippets.

@manpages
Created April 16, 2014 18:19
Show Gist options
  • Save manpages/10916352 to your computer and use it in GitHub Desktop.
Save manpages/10916352 to your computer and use it in GitHub Desktop.
darkproger's example
[guest@nixvm:~/haskell]$ cat default.nix
{ haskellPackages ? (import <nixpkgs> {}).haskellPackages }:
let
inherit (haskellPackages) cabal cabalInstall mtl transformers;
in cabal.mkDerivation (self: {
pname = "test";
version = "0.1.0.0";
isExecutable = true;
src = ./.;
buildDepends = [
mtl transformers
];
buildTools = [ cabalInstall ];
})
[guest@nixvm:~/haskell]$ cabal --version
The program ‘cabal’ is currently not installed. You can install it by typing:
nix-env -i cabal-install
[guest@nixvm:~/haskell]$ nix-shell
warning: you did not specify `--add-root'; the result might be removed by the garbage collector
[nix-shell:~/haskell]$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment