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;
|
procps_pkg = if stdenv.hostPlatform.isLinux then procpsWithoutSystemd else procps;
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "tpm2-tss";
|
pname = "tpm2-tss";
|
||||||
version = "4.1.3";
|
version = "4.1.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tpm2-software";
|
owner = "tpm2-software";
|
||||||
repo = pname;
|
repo = finalAttrs.pname;
|
||||||
rev = version;
|
rev = finalAttrs.version;
|
||||||
hash = "sha256-BP28utEUI9g1VNv3lCXuiKrDtEImFQxxZfIjLiE3Wr8=";
|
hash = "sha256-BP28utEUI9g1VNv3lCXuiKrDtEImFQxxZfIjLiE3Wr8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -67,9 +67,9 @@ stdenv.mkDerivation rec {
|
|||||||
# when unit and/or integration testing is enabled
|
# when unit and/or integration testing is enabled
|
||||||
# cmocka doesn't build with pkgsStatic, and we don't need it anyway
|
# cmocka doesn't build with pkgsStatic, and we don't need it anyway
|
||||||
# when tests are not run
|
# when tests are not run
|
||||||
++ lib.optional doInstallCheck cmocka;
|
++ lib.optional finalAttrs.doInstallCheck cmocka;
|
||||||
|
|
||||||
nativeInstallCheckInputs = lib.optionals doInstallCheck [
|
nativeInstallCheckInputs = lib.optionals finalAttrs.doInstallCheck [
|
||||||
cmocka
|
cmocka
|
||||||
which
|
which
|
||||||
openssl
|
openssl
|
||||||
@ -107,7 +107,7 @@ stdenv.mkDerivation rec {
|
|||||||
substituteInPlace ./test/unit/tctildr-dl.c \
|
substituteInPlace ./test/unit/tctildr-dl.c \
|
||||||
--replace-fail '@PREFIX@' $out/lib/
|
--replace-fail '@PREFIX@' $out/lib/
|
||||||
substituteInPlace ./bootstrap \
|
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
|
for src in src/tss2-tcti/tcti-libtpms.c test/unit/tcti-libtpms.c; do
|
||||||
substituteInPlace "$src" \
|
substituteInPlace "$src" \
|
||||||
--replace-fail '"libtpms.so"' '"${libtpms.out}/lib/libtpms.so"' \
|
--replace-fail '"libtpms.so"' '"${libtpms.out}/lib/libtpms.so"' \
|
||||||
@ -125,7 +125,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
lib.optionals doInstallCheck [
|
lib.optionals finalAttrs.doInstallCheck [
|
||||||
"--enable-unit"
|
"--enable-unit"
|
||||||
"--enable-integration"
|
"--enable-integration"
|
||||||
]
|
]
|
||||||
@ -163,4 +163,4 @@ stdenv.mkDerivation rec {
|
|||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ baloo ];
|
maintainers = with maintainers; [ baloo ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user