1 { fetchurl, bash, glibc, lib, stdenv, installShellFiles }:
5 url = "https://salsa.debian.org/debian/daemontools/-/archive/debian/1%250.76-8/daemontools-debian-1%250.76-8.tar.gz?path=debian/daemontools-man";
6 sha256 = "sha256-om5r1ddUx1uObp9LR+SwCLLtm+rRuLoq28OLbhWhdzU=";
9 stdenv.mkDerivation rec {
10 pname = "daemontools";
14 url = "https://cr.yp.to/daemontools/daemontools-${version}.tar.gz";
15 sha256 = "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5";
18 patches = [ ./fix-nix-usernamespace-build.patch ];
20 outputs = [ "out" "man" ];
22 nativeBuildInputs = [ installShellFiles ];
25 cd daemontools-${version}
27 sed -ie '1 s_$_ -include ${glibc.dev}/include/errno.h_' src/conf-cc
29 substituteInPlace src/Makefile \
30 --replace '/bin/sh' '${bash}/bin/bash -oxtrace'
32 sed -ie "s_^PATH=.*_PATH=$src/daemontools-${version}/compile:''${PATH}_" src/rts.tests
34 cat ${glibc.dev}/include/errno.h
42 for cmd in $(cat package/commands); do
43 install -Dm755 "command/$cmd" "$out/bin/$cmd"
46 tar -xz --strip-components=2 -f ${man-pages}
47 installManPage daemontools-man/*.8
48 install -v -Dm644 daemontools-man/README $man/share/doc/daemontools/README.man
51 # Keep README.man in the man output (see _multioutDocs())
55 license = lib.licenses.publicDomain;
56 homepage = "https://cr.yp.to/daemontools.html";
57 description = "A collection of tools for managing UNIX services";
59 maintainers = with lib.maintainers; [ kevincox ];
60 platforms = lib.platforms.unix;