From 9cbe4d60b1d0836dcbb02ac61750fc8ee34ab2f4 Mon Sep 17 00:00:00 2001 From: Yureka Date: Sat, 3 Dec 2022 12:27:39 +0100 Subject: pkgsMusl.procps: fix build (#204212) --- pkgs/os-specific/linux/procps-ng/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 ]; -- cgit 1.4.1