mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
The upstream/1.38.1 tag on salsa.debian.org was rewritten again on 2026-07-03 (gbp re-import ahead of the 2.x releases). The rewrite restored the wrapawk file that a previous rewrite had dropped, so the tag now serves the tree recorded before #531118 and fetching with the current hash fails: specified: sha256-sAzXeONjDT753lbu7amQY6yXpaTNCa4wFOzB01SRbCs= got: sha256-1Xmb8OPZSVP4xtSBGuwwKwdVQXixEugMgQfvAJueJAg= Hydra does not notice because the old fetch is already cached. Pin the commit the tag points to instead of the tag itself, so the next rewrite cannot break the fetch again.
75 lines
1.7 KiB
Nix
75 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitLab,
|
|
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";
|
|
# The upstream/1.38.1 tag has been rewritten twice (gbp re-imports),
|
|
# so pin the commit it currently points to instead of the tag.
|
|
rev = "225d248bdacff1240e27a4473a736326aac940f5"; # upstream/1.38.1
|
|
hash = "sha256-1Xmb8OPZSVP4xtSBGuwwKwdVQXixEugMgQfvAJueJAg=";
|
|
};
|
|
|
|
patches = lib.optionals stdenv.hostPlatform.isLinux [ ./einval.patch ];
|
|
|
|
nativeBuildInputs = [
|
|
autoreconfHook
|
|
po4a
|
|
];
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libcap ];
|
|
|
|
postUnpack = ''
|
|
sed -i \
|
|
-e 's@getopt@${getopt}/bin/getopt@g' \
|
|
-e 's@sed@${gnused}/bin/sed@g' \
|
|
-e 's@kill@${coreutils}/bin/kill@g' \
|
|
-e 's@/bin/ls@${coreutils}/bin/ls@g' \
|
|
-e 's@cut@${coreutils}/bin/cut@g' \
|
|
source/scripts/fakeroot.in
|
|
'';
|
|
|
|
postConfigure = ''
|
|
pushd doc
|
|
po4a -k 0 --variable "srcdir=../doc/" po4a/po4a.cfg
|
|
popd
|
|
'';
|
|
|
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
|
doInstallCheck = true;
|
|
|
|
passthru = {
|
|
tests = {
|
|
# A lightweight *unit* test that exercises fakeroot and fakechroot together:
|
|
nixos-etc = nixosTests.etc.test-etc-fakeroot;
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://salsa.debian.org/clint/fakeroot";
|
|
description = "Give a fake root environment through LD_PRELOAD";
|
|
mainProgram = "fakeroot";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = [ ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|