tpm2-tss: use finalAttrs for overriding doInstallCheck (#430884)

authored by nikstur and committed by GitHub 429c26ac 3f63b0cf

+8 -8
+8 -8
pkgs/development/libraries/tpm2-tss/default.nix
··· 29 29 procps_pkg = if stdenv.hostPlatform.isLinux then procpsWithoutSystemd else procps; 30 30 in 31 31 32 - stdenv.mkDerivation rec { 32 + stdenv.mkDerivation (finalAttrs: { 33 33 pname = "tpm2-tss"; 34 34 version = "4.1.3"; 35 35 36 36 src = fetchFromGitHub { 37 37 owner = "tpm2-software"; 38 - repo = pname; 39 - rev = version; 38 + repo = finalAttrs.pname; 39 + rev = finalAttrs.version; 40 40 hash = "sha256-BP28utEUI9g1VNv3lCXuiKrDtEImFQxxZfIjLiE3Wr8="; 41 41 }; 42 42 ··· 67 67 # when unit and/or integration testing is enabled 68 68 # cmocka doesn't build with pkgsStatic, and we don't need it anyway 69 69 # when tests are not run 70 - ++ lib.optional doInstallCheck cmocka; 70 + ++ lib.optional finalAttrs.doInstallCheck cmocka; 71 71 72 - nativeInstallCheckInputs = lib.optionals doInstallCheck [ 72 + nativeInstallCheckInputs = lib.optionals finalAttrs.doInstallCheck [ 73 73 cmocka 74 74 which 75 75 openssl ··· 107 107 substituteInPlace ./test/unit/tctildr-dl.c \ 108 108 --replace-fail '@PREFIX@' $out/lib/ 109 109 substituteInPlace ./bootstrap \ 110 - --replace-fail 'git describe --tags --always --dirty' 'echo "${version}"' 110 + --replace-fail 'git describe --tags --always --dirty' 'echo "${finalAttrs.version}"' 111 111 for src in src/tss2-tcti/tcti-libtpms.c test/unit/tcti-libtpms.c; do 112 112 substituteInPlace "$src" \ 113 113 --replace-fail '"libtpms.so"' '"${libtpms.out}/lib/libtpms.so"' \ ··· 125 125 ''; 126 126 127 127 configureFlags = 128 - lib.optionals doInstallCheck [ 128 + lib.optionals finalAttrs.doInstallCheck [ 129 129 "--enable-unit" 130 130 "--enable-integration" 131 131 ] ··· 163 163 platforms = platforms.unix; 164 164 maintainers = with maintainers; [ baloo ]; 165 165 }; 166 - } 166 + })