fakeroot: modernize (#536477)

This commit is contained in:
Peder Bergebakken Sundt
2026-06-29 11:56:16 +00:00
committed by GitHub
+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;
};