From f476d686e88414656cc3ce87e953deb4a3e1d6c9 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 4 May 2016 16:16:17 +0200 Subject: [PATCH] haskell-stack: add a top-level attribute 'stack', a space-efficient variant of 'haskellPackages.stack' The "stack" closure does not include the stack library and therefore has a much smaller closure, i.e. 17 MB instead of 1 GB. Fixes https://github.com/NixOS/nixpkgs/issues/15216. --- pkgs/top-level/all-packages.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f6f01a59e94..0e5052437f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4371,11 +4371,20 @@ in haskellPackages = haskell.packages.ghc7103.override { overrides = config.haskellPackageOverrides or (self: super: {}); }; - inherit (self.haskellPackages) ghc cabal-install stack; + + inherit (self.haskellPackages) ghc cabal-install; + + stack = haskell.lib.overrideCabal haskellPackages.stack (drv: { + enableSharedExecutables = false; + isLibrary = false; + doHaddock = false; + postFixup = "rm -rf $out/lib $out/nix-support $out/share/doc"; + }); haxe = callPackage ../development/compilers/haxe { inherit (ocamlPackages) camlp4; }; + hxcpp = callPackage ../development/compilers/haxe/hxcpp.nix { }; hhvm = callPackage ../development/compilers/hhvm { };