diff options
author | Peter Simons <simons@cryp.to> | 2015-04-28 13:14:05 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-04-28 13:17:44 +0200 |
commit | c449a930aaf849416b39062d80b6e9eff24a9add (patch) | |
tree | 62c547d55b892905724438501ab5673da27ceff7 /pkgs | |
parent | 71910be9ea225895e36f60ed23a1bdce402b3088 (diff) | |
download | nixlib-c449a930aaf849416b39062d80b6e9eff24a9add.tar nixlib-c449a930aaf849416b39062d80b6e9eff24a9add.tar.gz nixlib-c449a930aaf849416b39062d80b6e9eff24a9add.tar.bz2 nixlib-c449a930aaf849416b39062d80b6e9eff24a9add.tar.lz nixlib-c449a930aaf849416b39062d80b6e9eff24a9add.tar.xz nixlib-c449a930aaf849416b39062d80b6e9eff24a9add.tar.zst nixlib-c449a930aaf849416b39062d80b6e9eff24a9add.zip |
ghcWithPackages: add postBuild hook so that users can mess with the generated environment
postBuild can be used to execute user-specific commands on the generated $out environment before finalizing the build. For example, this hook can be used to generate appropriate 'makeWrapper' script for binaries contained in the environment.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/haskell-modules/with-packages-wrapper.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index 30035671a327..136566f65f0b 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -1,6 +1,7 @@ -{ stdenv, lib, ghc, llvmPackages, packages, buildEnv -, makeWrapper -, ignoreCollisions ? false, withLLVM ? false }: +{ stdenv, lib, ghc, llvmPackages, packages, buildEnv, makeWrapper +, ignoreCollisions ? false, withLLVM ? false +, postBuild ? "" +}: # This wrapper works only with GHC 6.12 or later. assert lib.versionOlder "6.12" ghc.version || ghc.isGhcjs; @@ -89,7 +90,7 @@ buildEnv { ${lib.optionalString hasLibraries "$out/bin/${ghcCommand}-pkg recache"} $out/bin/${ghcCommand}-pkg check - ''; + '' + postBuild; } // { preferLocalBuild = true; inherit (ghc) version meta; |