Merge pull request #31395 from vaibhavsagar/cleanup-ihaskell-wrapper

ihaskell/wrapper.nix: unify ihaskellEnv and ihaskell
This commit is contained in:
Peter Simons 2017-11-27 20:49:22 +01:00 committed by GitHub
commit e7f4979270
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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
@ -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 {

View file

@ -2727,7 +2727,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 ]);