1
0
mirror of https://github.com/IHaskell/IHaskell.git synced 2025-04-20 05:16:09 +00:00

release.nix: add 'staticExecutable' option that is false by default

This commit is contained in:
Vaibhav Sagar 2021-09-30 04:36:16 +10:00
parent 7cf52887ec
commit 45816b9ed8
3 changed files with 8 additions and 1 deletions

@ -3,6 +3,7 @@
, packages ? (_: [])
, pythonPackages ? (_: [])
, rtsopts ? "-M3g -N2"
, staticExecutable ? false
, systemPackages ? (_: [])
}:
import (./release.nix) { inherit compiler nixpkgs packages pythonPackages rtsopts systemPackages; }

@ -9,6 +9,7 @@ in
, packages ? (_: [])
, pythonPackages ? (_: [])
, rtsopts ? "-M3g -N2"
, staticExecutable ? false
, systemPackages ? (_: [])
}:
import (./release.nix) { inherit compiler nixpkgs packages pythonPackages rtsopts systemPackages; }

@ -3,6 +3,7 @@
, packages ? (_: [])
, pythonPackages ? (_: [])
, rtsopts ? "-M3g -N2"
, staticExecutable ? false
, systemPackages ? (_: [])
}:
@ -28,7 +29,11 @@ let
ipython-kernel = self.callCabal2nix "ipython-kernel" "${ihaskell-src}/ipython-kernel" {};
} // displays self);
});
ihaskellExe = nixpkgs.haskell.lib.justStaticExecutables haskellPackages.ihaskell;
# statically linking against haskell libs reduces closure size at the expense
# of startup/reload time, so we make it configurable
ihaskellExe = if staticExecutable
then nixpkgs.haskell.lib.justStaticExecutables haskellPackages.ihaskell
else nixpkgs.haskell.lib.enableSharedExecutables haskellPackages.ihaskell;
ihaskellEnv = haskellPackages.ghcWithPackages packages;
jupyterlab = nixpkgs.python3.withPackages (ps: [ ps.jupyterlab ] ++ pythonPackages ps);
ihaskellGhcLibFunc = exe: env: nixpkgs.writeShellScriptBin "ihaskell" ''