pkgsMusl.procps: fix build (#204212)

This commit is contained in:
Yureka 2022-12-03 12:27:39 +01:00 committed by GitHub
parent 7ec4183673
commit 9cbe4d60b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ];