mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
79 lines
2.4 KiB
Nix
79 lines
2.4 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
coreutils,
|
|
pkg-config,
|
|
util-linux,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "uutils-util-linux";
|
|
version = "0.0.1-unstable-2026-09-01";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "uutils";
|
|
repo = "util-linux";
|
|
rev = "77b6743fb63660a6a3f9a9ad09ff1963480d0e74";
|
|
hash = "sha256-QO+Lr6vl3lVS7moRDUK3fM5RdVHE9pfT64VAzKSicNA=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace tests/by-util/test_setsid.rs \
|
|
--replace-fail "/usr/bin/cat" "${lib.getExe' coreutils "cat"}" \
|
|
--replace-fail "/usr/bin/true" "${lib.getExe' coreutils "true"}" \
|
|
--replace-fail "/usr/bin/false" "${lib.getExe' coreutils "false"}"
|
|
substituteInPlace tests/by-util/test_setpgid.rs \
|
|
--replace-fail "echo" "${lib.getExe' coreutils "echo"}" \
|
|
--replace-fail '"cut"' '"${lib.getExe' coreutils "cut"}"'
|
|
'';
|
|
|
|
cargoHash = "sha256-XdFwScItuXWqd/IBhsZcDMilv7KkUwm0JT1sM0QFmC4=";
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
rustPlatform.bindgenHook
|
|
];
|
|
|
|
buildInputs = [ util-linux ];
|
|
|
|
preBuild = ''
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -lsmartcols -lmount"
|
|
'';
|
|
|
|
cargoBuildFlags = [ "--workspace" ];
|
|
|
|
checkFlags = [
|
|
# Operation not supported
|
|
"--skip=common::util::tests::test_compare_xattrs"
|
|
# can't run on sandbox
|
|
"--skip=test_last::test_display_hostname_last_column"
|
|
"--skip=test_last::test_last"
|
|
"--skip=test_last::test_limit_arg"
|
|
"--skip=test_last::test_since_only_shows_entries_after_time"
|
|
"--skip=test_last::test_timestamp_format_full"
|
|
"--skip=test_last::test_timestamp_format_iso"
|
|
"--skip=test_last::test_timestamp_format_no_time"
|
|
"--skip=test_last::test_timestamp_format_short"
|
|
"--skip=test_last::test_until_only_shows_entries_before_time"
|
|
"--skip=test_lscpu::test_json"
|
|
"--skip=test_lscpu::test_output"
|
|
"--skip=test_lslocks::test_column_headers"
|
|
"--skip=test_chcpu::linux::test_absent_cpu_is_reported_once"
|
|
"--skip=test_chcpu::linux::test_every_absent_cpu_is_reported_once"
|
|
];
|
|
|
|
passthru.updateScript = nix-update-script {
|
|
extraArgs = [ "--version=branch" ];
|
|
};
|
|
|
|
meta = {
|
|
description = "Rust reimplementation of the util-linux project";
|
|
homepage = "https://github.com/uutils/util-linux";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ kyehn ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|