Please add `cabal-install` to default.nix
wizzup opened this issue · comments
Wisut Hantanong commented
I think nix expression should self-contains and not assume cabal-install
already exist on the system.
I try to add cabal-install
to default.nix
but somehow fail
$ git diff
diff --git a/default.nix b/default.nix
index 21e0aed..d51fa06 100644
--- a/default.nix
+++ b/default.nix
@@ -12,5 +12,6 @@ let
drv = haskellPackages.callPackage ./applied-fp-course.nix {};
+ drvWithTools = pkgs.haskell.lib.addBuildDepends drv [ pkgs.cabal-install ];
in
- drv
+ if pkgs.lib.inNixShell then drvWithTools.env else drv
$ nix-shell
error: attribute 'override' missing, at /nix/store/4vhnyxwg0bv15zvhqixgwhb1a1h5pa1w-source/pkgs/development/haskell-modules/lib.nix:37:28
Also introducing shell.nix
could be one way to solve the problem and open for adding additional tools (for example: linter, ide tools) to the shell.
Wisut Hantanong commented
Oops! there is already shell.nix
, please forgive my ignorance.