fakeroot: modernize

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
Ethan Carter Edwards
2026-06-28 16:07:27 -07:00
parent c91b16ff8c
commit a75b60ea7d
+15 -13
View File
@@ -1,27 +1,29 @@
{
lib,
coreutils,
stdenv,
fetchFromGitLab,
fetchpatch,
getopt,
libcap,
gnused,
nixosTests,
testers,
autoreconfHook,
po4a,
libcap,
getopt,
gnused,
coreutils,
versionCheckHook,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
version = "1.38.1";
pname = "fakeroot";
strictDeps = true;
__structuredAttrs = true;
src = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "clint";
repo = "fakeroot";
rev = "upstream/${finalAttrs.version}";
domain = "salsa.debian.org";
tag = "upstream/${finalAttrs.version}";
hash = "sha256-sAzXeONjDT753lbu7amQY6yXpaTNCa4wFOzB01SRbCs=";
};
@@ -34,7 +36,7 @@ stdenv.mkDerivation (finalAttrs: {
autoreconfHook
po4a
];
buildInputs = lib.optional stdenv.hostPlatform.isLinux libcap;
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libcap ];
postUnpack = ''
sed -i \
@@ -52,11 +54,11 @@ stdenv.mkDerivation (finalAttrs: {
popd
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
passthru = {
tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
};
# A lightweight *unit* test that exercises fakeroot and fakechroot together:
nixos-etc = nixosTests.etc.test-etc-fakeroot;
};