From 9a3eb6468ccffb7da5a801b1d2af8c115aaae1e7 Mon Sep 17 00:00:00 2001 From: Yureka Date: Fri, 7 Oct 2022 14:23:02 +0200 Subject: [PATCH] pkgsMusl.fakeroot: fix build --- pkgs/tools/system/fakeroot/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/tools/system/fakeroot/default.nix b/pkgs/tools/system/fakeroot/default.nix index f69565745b3c..4ca22cb23859 100644 --- a/pkgs/tools/system/fakeroot/default.nix +++ b/pkgs/tools/system/fakeroot/default.nix @@ -24,6 +24,19 @@ stdenv.mkDerivation rec { url = "https://sources.debian.org/data/main/f/fakeroot/1.29-1/debian/patches/also-wrap-stat-library-call.patch"; sha256 = "0p7lq6m31k3rqsnjbi06a8ykdqa3cp4y5ngsjyk3q1269gx59x8b"; }) + + # patches needed for musl libc, borrowed from alpine packaging. + # it is applied regardless of the environment to prevent patchrot + (fetchpatch { + name = "do-not-redefine-id_t.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/fakeroot/do-not-redefine-id_t.patch?id=f68c541324ad07cc5b7f5228501b5f2ce4b36158"; + sha256 = "sha256-i9PoWriSrQ7kLZzbvZT3Kq1oXzK9mTyBqq808BGepOw="; + }) + (fetchpatch { + name = "fakeroot-no64.patch"; + url = "https://git.alpinelinux.org/aports/plain/main/fakeroot/fakeroot-no64.patch?id=f68c541324ad07cc5b7f5228501b5f2ce4b36158"; + sha256 = "sha256-NCDaB4nK71gvz8iQxlfaQTazsG0SBUQ/RAnN+FqwKkY="; + }) ]; buildInputs = [ getopt gnused ]