From 897fa059a14d3f58dda09dab1db3f913c74fd936 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Mon, 12 Dec 2022 23:22:55 +0000 Subject: [PATCH] polkit: only fix mocklibc when doing tests I got this error when setting doCheck=false: chmod: cannot access 'subprojects/mocklibc-1.0/bin/mocklibc': No such file or directory The chmod only happens when not building under pkgsMusl, but it doesn't seem to be related to musl. Instead, it seems that mocklibc only gets unpacked when -Dtests=true? This would explain why under musl the same error would happen (since under musl, tests are disabled). --- pkgs/development/libraries/polkit/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/polkit/default.nix b/pkgs/development/libraries/polkit/default.nix index 32571d9e9abc..645a13272545 100644 --- a/pkgs/development/libraries/polkit/default.nix +++ b/pkgs/development/libraries/polkit/default.nix @@ -152,7 +152,7 @@ stdenv.mkDerivation rec { --replace /bin/false ${coreutils}/bin/false ''; - postConfigure = lib.optionalString (!stdenv.hostPlatform.isMusl) '' + postConfigure = lib.optionalString doCheck '' # Unpacked by meson chmod +x subprojects/mocklibc-1.0/bin/mocklibc patchShebangs subprojects/mocklibc-1.0/bin/mocklibc