diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2023-09-26 17:17:22 +0200 |
---|---|---|
committer | Jörg Thalheim <Mic92@users.noreply.github.com> | 2023-10-04 07:00:11 +0100 |
commit | 0aa8bd2dd97422b91ecb177cc93de1466be3da77 (patch) | |
tree | 665955bab079bc78112e65354b919574f3904412 /pkgs | |
parent | d67e1c5343a8213ec5b93a49859195f988b93f9a (diff) |
fakeroot: patch missing store path references
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/system/fakeroot/default.nix | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/pkgs/tools/system/fakeroot/default.nix b/pkgs/tools/system/fakeroot/default.nix index 4ca22cb238590..dd6ab9868aa85 100644 --- a/pkgs/tools/system/fakeroot/default.nix +++ b/pkgs/tools/system/fakeroot/default.nix @@ -1,4 +1,5 @@ { lib +, coreutils , stdenv , fetchurl , fetchpatch @@ -6,14 +7,15 @@ , libcap , gnused , nixosTests +, testers }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { version = "1.29"; pname = "fakeroot"; src = fetchurl { - url = "http://http.debian.net/debian/pool/main/f/fakeroot/fakeroot_${version}.orig.tar.gz"; + url = "http://http.debian.net/debian/pool/main/f/fakeroot/fakeroot_${finalAttrs.version}.orig.tar.gz"; sha256 = "sha256-j7uvt4DJFz46zkoEr7wdkA8zfzIWiDk59cfbNDG+fCA="; }; @@ -39,16 +41,23 @@ stdenv.mkDerivation rec { }) ]; - buildInputs = [ getopt gnused ] - ++ lib.optional (!stdenv.isDarwin) libcap - ; + buildInputs = lib.optional (!stdenv.isDarwin) libcap; postUnpack = '' - sed -i -e "s@getopt@$(type -p getopt)@g" -e "s@sed@$(type -p sed)@g" ${pname}-${version}/scripts/fakeroot.in + 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' \ + fakeroot-${finalAttrs.version}/scripts/fakeroot.in ''; passthru = { tests = { + version = testers.testVersion { + package = finalAttrs; + }; # A lightweight *unit* test that exercises fakeroot and fakechroot together: nixos-etc = nixosTests.etc.test-etc-fakeroot; }; @@ -61,4 +70,4 @@ stdenv.mkDerivation rec { maintainers = with lib.maintainers; [viric]; platforms = lib.platforms.unix; }; -} +}) |