add tpm2-tss test patch
This commit is contained in:
parent
e20724603b
commit
16e2a5dcc5
2 changed files with 37 additions and 1 deletions
33
nixpkgs/245332.patch
Normal file
33
nixpkgs/245332.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
From 15c139a200051c6b3ef5b82bbc862b4e79dfb826 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= <lotte@chir.rs>
|
||||
Date: Tue, 25 Jul 2023 07:54:29 +0100
|
||||
Subject: [PATCH] tpm-tss2: allow disabling tests
|
||||
|
||||
Currently, if you disable the check phase, tpm-tss2 will not build, as
|
||||
it will still require test dependencies due to the configure flags.
|
||||
|
||||
This commit only adds the test configureFlags if testing is enabled.
|
||||
---
|
||||
pkgs/development/libraries/tpm2-tss/default.nix | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/pkgs/development/libraries/tpm2-tss/default.nix b/pkgs/development/libraries/tpm2-tss/default.nix
|
||||
index 9d7cb73cc539c..4c9c8ec9676fa 100644
|
||||
--- a/pkgs/development/libraries/tpm2-tss/default.nix
|
||||
+++ b/pkgs/development/libraries/tpm2-tss/default.nix
|
||||
@@ -70,10 +70,11 @@ stdenv.mkDerivation rec {
|
||||
--replace 'git describe --tags --always --dirty' 'echo "${version}"'
|
||||
'';
|
||||
|
||||
- configureFlags = lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
|
||||
- "--enable-unit"
|
||||
- "--enable-integration"
|
||||
- ];
|
||||
+ preConfigure = lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) ''
|
||||
+ if [ ! -z $doCheck ]; then
|
||||
+ configureFlagsArray+=('--enable-unit' '--enable-integration')
|
||||
+ fi
|
||||
+ '';
|
||||
|
||||
doCheck = true;
|
||||
preCheck = ''
|
|
@ -5,5 +5,8 @@
|
|||
applyPatches {
|
||||
name = "nixpkgs-patched";
|
||||
src = nixpkgs;
|
||||
patches = [./nixpkgs.patch];
|
||||
patches = [
|
||||
./nixpkgs.patch
|
||||
./245332.patch
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue