diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-07-17 17:43:20 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-07-17 17:43:20 +0200 |
commit | 94a216ad062646a509b824f23915e95271efb243 (patch) | |
tree | 67ad2deeb9c92578791095f34c05712ad575fefa | |
parent | a4727b856b1e26be7d8ec7fa3c6c99338efd062c (diff) | |
download | thermoprint-94a216ad062646a509b824f23915e95271efb243.tar thermoprint-94a216ad062646a509b824f23915e95271efb243.tar.gz thermoprint-94a216ad062646a509b824f23915e95271efb243.tar.bz2 thermoprint-94a216ad062646a509b824f23915e95271efb243.tar.xz thermoprint-94a216ad062646a509b824f23915e95271efb243.zip |
Fix wrapper build
-rw-r--r-- | server/wrapped.nix | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/server/wrapped.nix b/server/wrapped.nix index 04a483b..8fde8ac 100644 --- a/server/wrapped.nix +++ b/server/wrapped.nix | |||
@@ -1,14 +1,17 @@ | |||
1 | { stdenv, makeWrapper | 1 | { runCommand, makeWrapper |
2 | , ghcWithPackages | 2 | , ghcWithPackages |
3 | , thermoprint-server | 3 | , thermoprint-server |
4 | , extraPackages ? (p: []) | 4 | , extraPackages ? (p: []) |
5 | }: | 5 | }: |
6 | 6 | ||
7 | stdenv.lib.overrideDerivation thermoprint-server (oldAttrs: { | 7 | let |
8 | name = "${oldAttrs.name}-wrapper"; | 8 | name = "${thermoprint-server.name}-wrapper"; |
9 | buildInputs = [makeWrapper]; | 9 | in runCommand name { |
10 | postInstall = '' | 10 | paths = [ thermoprint-server ]; |
11 | wrapProgram $out/bin/thermoprint-server \ | 11 | buildInputs = [ makeWrapper ]; |
12 | --set NIX_GHC ${ghcWithPackages (p: [thermoprint-server] ++ extraPackages p)}/bin/ghc | 12 | } '' |
13 | ''; | 13 | cp -vr ${thermoprint-server} $out |
14 | }) | 14 | chmod u+w $out/bin |
15 | wrapProgram $out/bin/thermoprint-server \ | ||
16 | --set NIX_GHC ${ghcWithPackages (p: [ thermoprint-server ] ++ extraPackages p)}/bin/ghc | ||
17 | '' | ||