From 44704440ef6d152b83604d3f953def69f8b41551 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Mon, 29 Mar 2021 21:17:56 +0200 Subject: [PATCH] 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. --- pkgs/build-support/release/nix-build.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/release/nix-build.nix b/pkgs/build-support/release/nix-build.nix index 97df52eaced..ac51b90e016 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 = ''