bfg-repo-cleaner: prefer versionCheckHook rather than testers.testVersion

https://github.com/NixOS/nixpkgs/blob/bd352cd67834c983d69adf4080d225dbe28f99ba/doc/stdenv/passthru.chapter.md?plain=1#L84
This commit is contained in:
Kenichi Kamiya
2025-02-10 14:31:51 +09:00
parent 6eba2ef25a
commit cb8300fbae
+7 -5
View File
@@ -4,8 +4,7 @@
fetchurl,
jre,
makeWrapper,
testers,
bfg-repo-cleaner,
versionCheckHook,
}:
stdenv.mkDerivation rec {
@@ -31,9 +30,12 @@ stdenv.mkDerivation rec {
makeWrapper "${jre}/bin/java" $out/bin/bfg --add-flags "-cp $out/share/java/$jarName com.madgag.git.bfg.cli.Main"
'';
passthru.tests.version = testers.testVersion {
package = bfg-repo-cleaner;
};
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
versionCheckProgramArg = [ "--version" ];
meta = with lib; {
homepage = "https://rtyley.github.io/bfg-repo-cleaner/";