6 withoutInitTools ? false,
9 stdenv.mkDerivation rec {
10 pname = if withoutInitTools then "sysvtools" else "sysvinit";
14 url = "mirror://savannah/sysvinit/sysvinit-${version}.tar.xz";
15 sha256 = "sha256-KmIf5uRSi8kTCLdIZ92q6733dT8COVwMW66Be9K346U=";
19 # Patch some minimal hard references, so halt/shutdown work
20 sed -i -e "s,/sbin/,$out/sbin/," src/halt.c src/init.c src/paths.h
23 buildInputs = [ libxcrypt ];
32 substituteInPlace src/Makefile --replace /usr /
37 mv $out/sbin/killall5 $out/bin
38 ln -sf killall5 $out/bin/pidof
40 + lib.optionalString withoutInitTools ''
42 rm -rf $out/sbin/!(sulogin)
44 rm -rf $out/share/man/man5
45 rm $(for i in $out/share/man/man8/*; do echo $i; done | grep -v 'pidof\|killall5')
46 rm $out/bin/wall $out/share/man/man1/wall.1
50 homepage = "https://www.nongnu.org/sysvinit/";
51 description = "Utilities related to booting and shutdown";
52 platforms = lib.platforms.linux;
53 license = lib.licenses.gpl2Plus;