about summary refs log tree commit diff
path: root/pkgs/build-support/release
diff options
context:
space:
mode:
authorSander van der Burg <svanderburg@gmail.com>2021-03-29 21:17:56 +0200
committerSander van der Burg <sander.van.der.burg@mendix.com>2021-03-29 21:24:00 +0200
commit44704440ef6d152b83604d3f953def69f8b41551 (patch)
treeaffad958c333704fddf948f41a5ed06b723022ee /pkgs/build-support/release
parent63be3d6498de5106aa88dc4bdb54dd806070d8d9 (diff)
releaseTools: fix nixBuild function
Without this fix, I can no longer build anything with releaseTools.nixBuild {}. A job typically fails with:

$ nix-build release.nix -A build.basic.x86_64-linux --show-trace
error: while evaluating the attribute 'lib' of the derivation 'libnixxml-0.1pre1234' at /home/sander/teststuff/nixpkgs/pkgs/build-support/release/nix-build.nix:89:5:
cannot coerce a set to a string, at /home/sander/teststuff/nixpkgs/pkgs/build-support/release/nix-build.nix:89:5

This is caused by the fact that `lib' is propagated as a parameter, which is a function. Functions cannot be converted to strings.
Diffstat (limited to 'pkgs/build-support/release')
-rw-r--r--pkgs/build-support/release/nix-build.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/release/nix-build.nix b/pkgs/build-support/release/nix-build.nix
index 97df52eaced26..ac51b90e01639 100644
--- a/pkgs/build-support/release/nix-build.nix
+++ b/pkgs/build-support/release/nix-build.nix
@@ -83,9 +83,9 @@ stdenv.mkDerivation (
     '';
   }
 
-  // args //
+  // removeAttrs args [ "lib" ] # Propagating lib causes the evaluation to fail, because lib is a function that can't be converted to a string
 
-  {
+  // {
     name = name + (if src ? version then "-" + src.version else "");
 
     postHook = ''