tpm2-tss: use finalAttrs for overriding doInstallCheck

secufoe 5930fdcb 4c7da7b9

Changed files
+8 -8
pkgs
development
libraries
tpm2-tss
+8 -8
pkgs/development/libraries/tpm2-tss/default.nix
···
procps_pkg = if stdenv.hostPlatform.isLinux then procpsWithoutSystemd else procps;
in
-
stdenv.mkDerivation rec {
+
stdenv.mkDerivation (finalAttrs: {
pname = "tpm2-tss";
version = "4.1.3";
src = fetchFromGitHub {
owner = "tpm2-software";
-
repo = pname;
-
rev = version;
+
repo = finalAttrs.pname;
+
rev = finalAttrs.version;
hash = "sha256-BP28utEUI9g1VNv3lCXuiKrDtEImFQxxZfIjLiE3Wr8=";
};
···
# when unit and/or integration testing is enabled
# cmocka doesn't build with pkgsStatic, and we don't need it anyway
# when tests are not run
-
++ lib.optional doInstallCheck cmocka;
+
++ lib.optional finalAttrs.doInstallCheck cmocka;
-
nativeInstallCheckInputs = lib.optionals doInstallCheck [
+
nativeInstallCheckInputs = lib.optionals finalAttrs.doInstallCheck [
cmocka
which
openssl
···
substituteInPlace ./test/unit/tctildr-dl.c \
--replace-fail '@PREFIX@' $out/lib/
substituteInPlace ./bootstrap \
-
--replace-fail 'git describe --tags --always --dirty' 'echo "${version}"'
+
--replace-fail 'git describe --tags --always --dirty' 'echo "${finalAttrs.version}"'
for src in src/tss2-tcti/tcti-libtpms.c test/unit/tcti-libtpms.c; do
substituteInPlace "$src" \
--replace-fail '"libtpms.so"' '"${libtpms.out}/lib/libtpms.so"' \
···
'';
configureFlags =
-
lib.optionals doInstallCheck [
+
lib.optionals finalAttrs.doInstallCheck [
"--enable-unit"
"--enable-integration"
]
···
platforms = platforms.unix;
maintainers = with maintainers; [ baloo ];
};
-
}
+
})