summary refs log tree commit diff
diff options
context:
space:
mode:
authorYureka <yuka@yuka.dev>2022-12-03 12:27:39 +0100
committerGitHub <noreply@github.com>2022-12-03 12:27:39 +0100
commit9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4 (patch)
tree12d5b637f26e6fd51c5cba664ef46204debb87fc
parent7ec41836730f4344e835c1ca06e33d347ff017a6 (diff)
downloadnixpkgs-9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4.tar
nixpkgs-9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4.tar.gz
nixpkgs-9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4.tar.bz2
nixpkgs-9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4.tar.lz
nixpkgs-9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4.tar.xz
nixpkgs-9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4.tar.zst
nixpkgs-9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4.zip
pkgsMusl.procps: fix build (#204212)
-rw-r--r--pkgs/os-specific/linux/procps-ng/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/procps-ng/default.nix b/pkgs/os-specific/linux/procps-ng/default.nix
index 781d9d54871..c87c337e61c 100644
--- a/pkgs/os-specific/linux/procps-ng/default.nix
+++ b/pkgs/os-specific/linux/procps-ng/default.nix
@@ -3,6 +3,7 @@
 , fetchurl
 , ncurses
 , pkg-config
+, fetchpatch
 
   # `ps` with systemd support is able to properly report different
   # attributes like unit name, so we want to have it on linux.
@@ -26,6 +27,16 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-RRiz56r9NOwH0AY9JQ/UdJmbILIAIYw65W9dIRPxQbQ=";
   };
 
+  patches = lib.optionals stdenv.hostPlatform.isMusl [
+    # NOTE: Starting from 4.x we will not need a patch anymore, but need to add
+    # "--disable-w" to configureFlags instead to prevent the utmp errors
+    (fetchpatch {
+      name = "musl-fix-includes.patch";
+      url = "https://git.alpinelinux.org/aports/plain/main/procps/musl-fixes.patch?id=37cb5b6ef194db66d9ed07c8ecab59bca3b91215";
+      sha256 = "sha256-DphAvESmVg1U3bJABU95R++QD34odStCl82EF0vmht0=";
+    })
+  ];
+
   buildInputs = [ ncurses ]
     ++ lib.optional withSystemd systemd;
   nativeBuildInputs = [ pkg-config ];