Skip to content

Commit

Permalink
ihaskell/wrapper.nix: unify ihaskellEnv and ihaskell
Browse files Browse the repository at this point in the history
Having both `ihaskell` and `ihaskellEnv` is redundant, and might even
cause problems if the two differ somehow.
  • Loading branch information
vaibhavsagar committed Nov 8, 2017
1 parent 845aae9 commit d341d28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkgs/development/tools/haskell/ihaskell/wrapper.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, writeScriptBin, makeWrapper, buildEnv, haskell, ghcWithPackages, ihaskell, jupyter, packages }:
{ stdenv, writeScriptBin, makeWrapper, buildEnv, haskell, ghcWithPackages, jupyter, packages }:
let
ihaskellEnv = ghcWithPackages (self: [
self.ihaskell
Expand All @@ -9,8 +9,8 @@ let
ihaskellSh = writeScriptBin "ihaskell-notebook" ''
#! ${stdenv.shell}
export GHC_PACKAGE_PATH="$(echo ${ihaskellEnv}/lib/*/package.conf.d| tr ' ' ':'):$GHC_PACKAGE_PATH"
export PATH="${stdenv.lib.makeBinPath ([ ihaskell ihaskellEnv jupyter ])}"
${ihaskell}/bin/ihaskell install -l $(${ihaskellEnv}/bin/ghc --print-libdir) && ${jupyter}/bin/jupyter notebook
export PATH="${stdenv.lib.makeBinPath ([ ihaskellEnv jupyter ])}"
${ihaskellEnv}/bin/ihaskell install -l $(${ihaskellEnv}/bin/ghc --print-libdir) && ${jupyter}/bin/jupyter notebook
'';
in
buildEnv {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2687,7 +2687,7 @@ with pkgs;


ihaskell = callPackage ../development/tools/haskell/ihaskell/wrapper.nix {
inherit (haskellPackages) ihaskell ghcWithPackages;
inherit (haskellPackages) ghcWithPackages;

jupyter = python3.withPackages (ps: [ ps.jupyter ps.notebook ]);

Expand Down

0 comments on commit d341d28

Please sign in to comment.