per-system-optim/nixpkgs/245332.patch

34 lines
1.3 KiB
Diff
Raw Permalink Normal View History

2023-07-25 10:11:01 +00:00
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 = ''