[Nix-dev] Installing a Haskell program

Amy de Buitléir amy at nualeargais.ie
Sun May 17 01:38:22 CEST 2015


Arseniy Seroka <ars.seroka <at> gmail.com> writes:

> My usual haskell workflow is```
> $ cabal2nix ./. --shell > shell.nix
> $ cabal2nix ./. > project.nix
> $ # I have file default.nix [1] in project too
> $ nix-shell # going into shell to use vim, ghc-mod etc
> $ nix-build # building my project, usually doing that in parallel to vim
> $ ./result/bin/foobar # testing my executable```[1] `pkgs ? import
<nixpkgs> {} }:
>       
>       
>         
>         pkgs.haskellngPackages.callPackage ./project.nix {}`

OK, I've started over, and tried your workflow.

[amy at wombat9000:~/jot]$ cabal2nix ./. --shell > shell.nix

[amy at wombat9000:~/jot]$ cabal2nix ./. > project.nix

[amy at wombat9000:~/jot]$ cat default.nix
pkgs ? import <nixpkgs> {} }: pkgs.haskellngPackages.callPackage
./project.nix {}

[amy at wombat9000:~/jot]$ nix-build
error: syntax error, unexpected SPATH, expecting $end, at
"/home/amy/jot/default.nix":1:15





More information about the nix-dev mailing list