tpm2-tss: use finalAttrs for overriding doInstallCheck
This commit is contained in:
parent
4c7da7b95d
commit
5930fdcb6c
@ -29,14 +29,14 @@ let
|
||||
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=";
|
||||
};
|
||||
|
||||
@ -67,9 +67,9 @@ stdenv.mkDerivation rec {
|
||||
# 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
|
||||
@ -107,7 +107,7 @@ stdenv.mkDerivation rec {
|
||||
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"' \
|
||||
@ -125,7 +125,7 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
lib.optionals doInstallCheck [
|
||||
lib.optionals finalAttrs.doInstallCheck [
|
||||
"--enable-unit"
|
||||
"--enable-integration"
|
||||
]
|
||||
@ -163,4 +163,4 @@ stdenv.mkDerivation rec {
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ baloo ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user