summary refs log tree commit diff
path: root/pkgs/tools/system/fakeroot
diff options
context:
space:
mode:
authorMichael Roitzsch <reactorcontrol@icloud.com>2021-05-13 15:22:10 +0200
committerMichael Roitzsch <reactorcontrol@icloud.com>2021-05-13 15:23:27 +0200
commita474001e5a310118fee934f04d33e5ffd9fa8844 (patch)
treefc4e25ed220a694511616e6a6fa472c33ecde4e5 /pkgs/tools/system/fakeroot
parent357e6b3560f008ac5b1974c9027ba78c4b277c6b (diff)
downloadnixpkgs-a474001e5a310118fee934f04d33e5ffd9fa8844.tar
nixpkgs-a474001e5a310118fee934f04d33e5ffd9fa8844.tar.gz
nixpkgs-a474001e5a310118fee934f04d33e5ffd9fa8844.tar.bz2
nixpkgs-a474001e5a310118fee934f04d33e5ffd9fa8844.tar.lz
nixpkgs-a474001e5a310118fee934f04d33e5ffd9fa8844.tar.xz
nixpkgs-a474001e5a310118fee934f04d33e5ffd9fa8844.tar.zst
nixpkgs-a474001e5a310118fee934f04d33e5ffd9fa8844.zip
fakeroot: apply all brew patches to fix Darwin
Diffstat (limited to 'pkgs/tools/system/fakeroot')
-rw-r--r--pkgs/tools/system/fakeroot/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/tools/system/fakeroot/default.nix b/pkgs/tools/system/fakeroot/default.nix
index 57a986e3da9..0e4f51c7ea6 100644
--- a/pkgs/tools/system/fakeroot/default.nix
+++ b/pkgs/tools/system/fakeroot/default.nix
@@ -37,6 +37,18 @@ stdenv.mkDerivation rec {
     sed -i -e "s@getopt@$(type -p getopt)@g" -e "s@sed@$(type -p sed)@g" ${pname}-${version}/scripts/fakeroot.in
   '';
 
+  postConfigure = let
+    # additional patch from brew, but needs to be applied to a generated file
+    patch-wraptmpf = fetchpatch {
+      name = "fakeroot-patch-wraptmpf-h.patch";
+      url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=3;bug=766649;filename=fakeroot-patch-wraptmpf-h.patch;msg=20";
+      sha256 = "1jhsi4bv6nnnjb4vmmmbhndqg719ckg860hgw98bli8m05zwbx6a";
+    };
+  in lib.optional stdenv.isDarwin ''
+    make wraptmpf.h
+    patch -p1 < ${patch-wraptmpf}
+  '';
+
   meta = {
     homepage = "https://salsa.debian.org/clint/fakeroot";
     description = "Give a fake root environment through LD_PRELOAD";