waylyrics: 0.3.16 -> 0.3.20 (#364626)
[NixPkgs.git] / pkgs / development / skaware-packages / s6-linux-init / default.nix
blob7b35ce8cf0415c17bcc8d1da7ab00215a49d2490
2   lib,
3   stdenv,
4   skawarePackages,
5   skalibs,
6   execline,
7   s6,
8   targetPackages,
9 }:
11 skawarePackages.buildPackage {
12   pname = "s6-linux-init";
13   version = "1.1.2.0";
14   sha256 = "sha256-Ea4I0KZiELXla2uu4Pa5sbafvtsF/aEoWxFaMcpGx38=";
16   description = "Set of minimalistic tools used to create a s6-based init system, including a /sbin/init binary, on a Linux kernel";
17   platforms = lib.platforms.linux;
19   outputs = [
20     "bin"
21     "dev"
22     "doc"
23     "out"
24   ];
26   configureFlags = [
27     "--bindir=\${bin}/bin"
28     "--includedir=\${dev}/include"
29     "--with-sysdeps=${skalibs.lib}/lib/skalibs/sysdeps"
30     "--with-include=${skalibs.dev}/include"
31     "--with-include=${execline.dev}/include"
32     "--with-include=${s6.dev}/include"
33     "--with-lib=${skalibs.lib}/lib"
34     "--with-lib=${s6.out}/lib"
35     "--with-lib=${execline.lib}/lib"
36     "--with-dynlib=${skalibs.lib}/lib"
37     "--with-dynlib=${execline.lib}/lib"
38     "--with-dynlib=${s6.out}/lib"
39   ];
41   # See ../s6-rc/default.nix for an explanation
42   postConfigure = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) ''
43     substituteInPlace src/init/s6-linux-init-maker.c \
44         --replace-fail '<execline/config.h>' '"${targetPackages.execline.dev}/include/execline/config.h"' \
45         --replace-fail '<s6/config.h>' '"${targetPackages.s6.dev}/include/s6/config.h"' \
46         --replace-fail '<s6-linux-init/config.h>' '"${targetPackages.s6-linux-init.dev}/include/s6-linux-init/config.h"'
47   '';
49   postInstall = ''
50     # remove all s6 executables from build directory
51     rm $(find -name "s6-*" -type f -mindepth 1 -maxdepth 1 -executable)
52     rm libs6_linux_init.* libhpr.*
53     rm -rf skel
55     mv doc $doc/share/doc/s6-linux-init/html
56   '';