[Nix-dev] Proper way of adding custom nix expressions

Richard Wallace rwallace at thewallacepack.net
Wed Oct 31 06:31:04 CET 2012


I've got almost everything setup for my Haskell project, but there's
one last thing I need help figuring out.  There are several packages
in cabal that aren't in nixpkgs (boomerang, web-routes, lens) that I
would like to use.

It seems like ~/.nix-defexpr is the place I should add anything
custom.  I ran `cabal2nix cabal://boomerang >
~/.nix-defexpr/boomerang.nix` then tried to verify it was there with
`nix-env -qaP \* | grep boomerang`, and got the error

error: cannot auto-call a function that has an argument without a
default value (`cabal')

As I understand it, this is because the expression in boomerang.nix
takes parameters (in this case, cabal, mtl and text).  I can add this
to ~/.nix-defexpr/channels/nixos/nixpkgs/pkgs/top-level/haskell-packages.nix,
but I'm worried about it getting overridden the next time I run
`nix-channel --update`, so what is the right way to set this up?

Thanks,
Rich


More information about the nix-dev mailing list