lol

systemd: use musl-getent on musl instead of glibc.bin's getent

+9 -2
+9 -2
pkgs/os-specific/linux/systemd/default.nix
··· 7 7 , autoreconfHook, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45 8 8 , ninja, meson, python3Packages, glibcLocales 9 9 , patchelf 10 + , musl-getent ? null 10 11 }: 11 12 12 13 assert stdenv.isLinux; 13 14 14 - let pythonLxmlEnv = python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]); 15 + let 16 + pythonLxmlEnv = python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]); 17 + getent-bin = 18 + if stdenv.hostPlatform.libc == "glibc" then stdenv.cc.libc.bin 19 + else if stdenv.hostPlatform.isMusl then "${musl-getent}" 20 + else throw "unsupported abi for systemd"; 21 + getent = "${getent-bin}/bin/getent"; 15 22 16 23 in 17 24 ··· 107 114 for i in src/remount-fs/remount-fs.c src/core/mount.c src/core/swap.c src/fsck/fsck.c units/emergency.service.in units/rescue.service.in src/journal/cat.c src/core/shutdown.c src/nspawn/nspawn.c src/shared/generator.c; do 108 115 test -e $i 109 116 substituteInPlace $i \ 110 - --replace /usr/bin/getent ${stdenv.glibc.bin}/bin/getent \ 117 + --replace /usr/bin/getent ${getent} \ 111 118 --replace /sbin/swapon ${utillinux.bin}/sbin/swapon \ 112 119 --replace /sbin/swapoff ${utillinux.bin}/sbin/swapoff \ 113 120 --replace /sbin/fsck ${utillinux.bin}/sbin/fsck \