uutils-coreutils: move to by-name, add versionCheckHook (#372336)

This commit is contained in:
Gaétan Lepage
2025-01-10 08:43:27 +01:00
committed by GitHub
2 changed files with 21 additions and 15 deletions
@@ -4,9 +4,10 @@
fetchFromGitHub,
rustPlatform,
cargo,
sphinx,
Security,
libiconv,
python3Packages,
versionCheckHook,
nix-update-script,
prefix ? "uutils-",
buildMulticallBinary ? true,
}:
@@ -30,17 +31,12 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
rustPlatform.cargoSetupHook
sphinx
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
Security
libiconv
python3Packages.sphinx
];
makeFlags =
[
"CARGO=${cargo}/bin/cargo"
"CARGO=${lib.getExe cargo}"
"PREFIX=${placeholder "out"}"
"PROFILE=release"
"INSTALLDIR_MAN=${placeholder "out"}/share/man/man1"
@@ -51,6 +47,21 @@ stdenv.mkDerivation rec {
# too many impure/platform-dependent tests
doCheck = false;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram =
let
prefix' = lib.optionalString (prefix != null) prefix;
in
"${placeholder "out"}/bin/${prefix'}ls";
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Cross-platform Rust rewrite of the GNU coreutils";
longDescription = ''
-5
View File
@@ -3170,11 +3170,6 @@ with pkgs;
uusi = haskell.lib.compose.justStaticExecutables haskellPackages.uusi;
uutils-coreutils = callPackage ../tools/misc/uutils-coreutils {
inherit (python3Packages) sphinx;
inherit (darwin.apple_sdk.frameworks) Security;
};
uutils-coreutils-noprefix = uutils-coreutils.override { prefix = null; };
vorta = qt6Packages.callPackage ../applications/backup/vorta { };