Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] systemd: patch to build on musl #37715

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ assert stdenv.isLinux;
let
pythonLxmlEnv = buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]);

in stdenv.mkDerivation rec {
in stdenv.mkDerivation (rec {
version = "238";
name = "systemd-${version}";

Expand Down Expand Up @@ -88,6 +88,12 @@ in stdenv.mkDerivation rec {
"-Dsulogin-path=${utillinux}/bin/sulogin"
"-Dmount-path=${utillinux}/bin/mount"
"-Dumount-path=${utillinux}/bin/umount"
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
"-Dnss-systemd=false"
"-Dlocaled=false"
"-Dresolve=false"
"-Dutmp=false"
"-Dmyhostname=false"
];

preConfigure = ''
Expand Down Expand Up @@ -210,4 +216,13 @@ in stdenv.mkDerivation rec {
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.eelco ];
};
}
} // stdenv.lib.optionalAttrs stdenv.hostPlatform.isMusl {
patches =
let systemd_rev = "c58ab03f64890e7db88745a843bd4520e307099b"; # v238-stable
in [
(fetchpatch {
url = "https://github.com/dtzWill/systemd/compare/${systemd_rev}...238-musl.patch";
sha256 = "09s5gbccbmm4j4p9fyn6x59achrlxk30rp5pmi20bh527mjgw442";
})
];
})