diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/tpm2-tss')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix b/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix index 06e1ac9409a1..5ab4ff3b413f 100644 --- a/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix +++ b/nixpkgs/pkgs/development/libraries/tpm2-tss/default.nix @@ -26,11 +26,21 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook autoconf-archive pkg-config doxygen perl ]; - buildInputs = [ openssl json_c curl libgcrypt ]; + + # cmocka is checked / used(?) in the configure script + # when unit and/or integration testing is enabled + buildInputs = [ openssl json_c curl libgcrypt uthash ] + # cmocka doesn't build with pkgsStatic, and we don't need it anyway + # when tests are not run + ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ + cmocka + ]; + checkInputs = [ - cmocka uthash ibm-sw-tpm2 iproute2 procps_pkg which + cmocka which openssl procps_pkg iproute2 ibm-sw-tpm2 ]; + strictDeps = true; preAutoreconf = "./bootstrap"; enableParallelBuilding = true; @@ -49,7 +59,7 @@ stdenv.mkDerivation rec { --replace '@PREFIX@' $out/lib ''; - configureFlags = [ + configureFlags = lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [ "--enable-unit" "--enable-integration" ]; |