Nixpkgs: pkgs.makeWrapper: `die`?

Created on 1 Oct 2017  Â·  5Comments  Â·  Source: NixOS/nixpkgs

All 5 comments

Okay, then why am I seeing this?

$ nix-build -E 'with import <nixpkgs> {}; pkgs.buildEnv { name = "dummy"; paths = []; postBuild = ". ${pkgs.makeWrapper}/nix-support/setup-hook; mkdir somedir; wrapProgram somedir";}'
these derivations will be built:
  /nix/store/jrnq61v75cm04a3k3y1kv4ygqdp9slz0-dummy.drv
building path(s) ‘/nix/store/116ggckzmd09gmgvb0dw1n8l459qmnij-dummy’
created 0 symlinks in user environment
/nix/store/c5yjzh27gv3pjkdnj2fyc587r7wvlqf7-hook/nix-support/setup-hook: line 7: die: command not found
builder for ‘/nix/store/jrnq61v75cm04a3k3y1kv4ygqdp9slz0-dummy.drv’ failed with exit code 127
error: build of ‘/nix/store/jrnq61v75cm04a3k3y1kv4ygqdp9slz0-dummy.drv’ failed

Because this is not how you should use makeWrapper. Look for examples in nixpkgs. Try this:

nix-build -E 'with import <nixpkgs> {}; pkgs.buildEnv { name = "dummy"; paths = []; buildInputs = [ makeWrapper ];  postBuild = "mkdir somedir; wrapProgram somedir";}'

Ah, I see. Thanks for your help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthiasbeyer picture matthiasbeyer  Â·  3Comments

ayyess picture ayyess  Â·  3Comments

spacekitteh picture spacekitteh  Â·  3Comments

sid-kap picture sid-kap  Â·  3Comments

chris-martin picture chris-martin  Â·  3Comments