3
0
Fork 0
forked from mirrors/nixpkgs

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.
This commit is contained in:
Sander van der Burg 2021-03-29 21:17:56 +02:00 committed by Sander van der Burg
parent 63be3d6498
commit 44704440ef

View file

@ -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 = ''