diff --git a/pkgs/development/libraries/p11-kit/default.nix b/pkgs/development/libraries/p11-kit/default.nix index 46f520e41e4..31a7e7e9086 100644 --- a/pkgs/development/libraries/p11-kit/default.nix +++ b/pkgs/development/libraries/p11-kit/default.nix @@ -36,6 +36,13 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; + # Tests run in fakeroot for non-root users + preCheck = '' + if [ "$(id -u)" != "0" ]; then + export FAKED_MODE=1 + fi + ''; + doCheck = !stdenv.isDarwin; installFlags = [