Skip to content

Commit eece875

Browse files
vaibhavsagarglobin
authored andcommittedNov 6, 2017
ihaskell: re-enable
1 parent 9e241d0 commit eece875

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed
 

‎nixos/modules/misc/ids.nix

+2-2
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
ripple-data-api = 186;
208208
mediatomb = 187;
209209
rdnssd = 188;
210-
# ihaskell = 189; # unused
210+
ihaskell = 189;
211211
i2p = 190;
212212
lambdabot = 191;
213213
asterisk = 192;
@@ -484,7 +484,7 @@
484484
#ripple-data-api = 186; #unused
485485
mediatomb = 187;
486486
#rdnssd = 188; # unused
487-
# ihaskell = 189; # unused
487+
ihaskell = 189;
488488
i2p = 190;
489489
lambdabot = 191;
490490
asterisk = 192;

‎nixos/modules/module-list.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
./services/misc/gogs.nix
305305
./services/misc/gollum.nix
306306
./services/misc/gpsd.nix
307-
#./services/misc/ihaskell.nix
307+
./services/misc/ihaskell.nix
308308
./services/misc/irkerd.nix
309309
./services/misc/jackett.nix
310310
./services/misc/logkeys.nix
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
{ stdenv, writeScriptBin, makeWrapper, buildEnv, ghcWithPackages, ihaskell, ipython, packages }:
1+
{ stdenv, writeScriptBin, makeWrapper, buildEnv, haskell, ghcWithPackages, ihaskell, jupyter, packages }:
22
let
33
ihaskellEnv = ghcWithPackages (self: [
44
self.ihaskell
5-
self.ihaskell-blaze
6-
self.ihaskell-diagrams
7-
self.ihaskell-display
5+
(haskell.lib.doJailbreak self.ihaskell-blaze)
6+
(haskell.lib.doJailbreak self.ihaskell-diagrams)
7+
(haskell.lib.doJailbreak self.ihaskell-display)
88
] ++ packages self);
99
ihaskellSh = writeScriptBin "ihaskell-notebook" ''
1010
#! ${stdenv.shell}
1111
export GHC_PACKAGE_PATH="$(echo ${ihaskellEnv}/lib/*/package.conf.d| tr ' ' ':'):$GHC_PACKAGE_PATH"
12-
export PATH="${stdenv.lib.makeBinPath [ ihaskell ihaskellEnv ipython ]}"
13-
${ihaskell}/bin/ihaskell install -l $(${ihaskellEnv}/bin/ghc --print-libdir) && ${ipython}/bin/ipython notebook --kernel=haskell
12+
export PATH="${stdenv.lib.makeBinPath ([ ihaskell ihaskellEnv jupyter ])}"
13+
${ihaskell}/bin/ihaskell install -l $(${ihaskellEnv}/bin/ghc --print-libdir) && ${jupyter}/bin/jupyter notebook
1414
'';
15-
profile = "${ihaskell.pname}-${ihaskell.version}/profile/profile.tar";
1615
in
1716
buildEnv {
1817
name = "ihaskell-with-packages";
19-
paths = [ ihaskellEnv ipython ];
18+
buildInputs = [ makeWrapper ];
19+
paths = [ ihaskellEnv jupyter ];
2020
postBuild = ''
21-
. "${makeWrapper}/nix-support/setup-hook"
22-
ln -s ${ihaskellSh}/bin/ihaskell-notebook $out/bin/.
21+
ln -s ${ihaskellSh}/bin/ihaskell-notebook $out/bin/
2322
for prg in $out/bin"/"*;do
24-
wrapProgram $prg --set PYTHONPATH "$(echo ${ipython}/lib/*/site-packages)"
23+
if [[ -f $prg && -x $prg ]]; then
24+
wrapProgram $prg --set PYTHONPATH "$(echo ${jupyter}/lib/*/site-packages)"
25+
fi
2526
done
2627
'';
2728
}

‎pkgs/top-level/all-packages.nix

+5-7
Original file line numberDiff line numberDiff line change
@@ -2684,15 +2684,13 @@ with pkgs;
26842684
};
26852685

26862686

2687-
# ihaskell = callPackage ../development/tools/haskell/ihaskell/wrapper.nix {
2688-
# inherit (haskellPackages) ihaskell ghcWithPackages;
2687+
ihaskell = callPackage ../development/tools/haskell/ihaskell/wrapper.nix {
2688+
inherit (haskellPackages) ihaskell ghcWithPackages;
26892689

2690-
# ipython = python3.buildEnv.override {
2691-
# extraLibs = with python3Packages; [ ipython ipykernel jupyter_client notebook ];
2692-
# };
2690+
jupyter = python3.withPackages (ps: [ ps.jupyter ps.notebook ]);
26932691

2694-
# packages = config.ihaskell.packages or (self: []);
2695-
# };
2692+
packages = config.ihaskell.packages or (self: []);
2693+
};
26962694

26972695
imapproxy = callPackage ../tools/networking/imapproxy { };
26982696

0 commit comments

Comments
 (0)
Please sign in to comment.