diff --git a/pkgs/development/libraries/tpm2-tss/default.nix b/pkgs/development/libraries/tpm2-tss/default.nix index 9b65060e25af..cd50c4014904 100644 --- a/pkgs/development/libraries/tpm2-tss/default.nix +++ b/pkgs/development/libraries/tpm2-tss/default.nix @@ -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 ]; }; -} +})