From 0228250f6facd75b7281790c60be49e81153307a Mon Sep 17 00:00:00 2001 From: fumnanya Date: Sun, 20 Jul 2025 23:40:41 +0100 Subject: [PATCH] fakeroot: add patch to fix on macos --- pkgs/by-name/fa/fakeroot/package.nix | 30 ++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/fa/fakeroot/package.nix b/pkgs/by-name/fa/fakeroot/package.nix index a7fbca8e3305..ae9883af71f1 100644 --- a/pkgs/by-name/fa/fakeroot/package.nix +++ b/pkgs/by-name/fa/fakeroot/package.nix @@ -25,17 +25,27 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-2ihdvYRnv2wpZrEikP4hCdshY8Eqarqnw3s9HPb+xKU="; }; - patches = lib.optionals stdenv.hostPlatform.isLinux [ - ./einval.patch + patches = + lib.optionals stdenv.hostPlatform.isLinux [ + ./einval.patch - # patches needed for musl libc, borrowed from alpine packaging. - # it is applied regardless of the environment to prevent patchrot - (fetchpatch { - name = "fakeroot-no64.patch"; - url = "https://git.alpinelinux.org/aports/plain/main/fakeroot/fakeroot-no64.patch?id=f68c541324ad07cc5b7f5228501b5f2ce4b36158"; - sha256 = "sha256-NCDaB4nK71gvz8iQxlfaQTazsG0SBUQ/RAnN+FqwKkY="; - }) - ]; + # patches needed for musl libc, borrowed from alpine packaging. + # it is applied regardless of the environment to prevent patchrot + (fetchpatch { + name = "fakeroot-no64.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/fakeroot/fakeroot-no64.patch?id=f68c541324ad07cc5b7f5228501b5f2ce4b36158"; + sha256 = "sha256-NCDaB4nK71gvz8iQxlfaQTazsG0SBUQ/RAnN+FqwKkY="; + }) + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # patch needed to fix execution on macos + # TODO: remove when the next release comes out: https://salsa.debian.org/clint/fakeroot/-/merge_requests/34 + (fetchpatch { + name = "fakeroot-fix-macos.patch"; + url = "https://salsa.debian.org/clint/fakeroot/-/merge_requests/34.diff"; + hash = "sha256-D5f1bXUaN2YMD/NTx/WIrqDBx/qNHpfLRcPhbdHYLl8="; + }) + ]; nativeBuildInputs = [ autoreconfHook