2021-01-15 10:19:50 +01:00
|
|
|
{ fetchurl, bash, glibc, lib, stdenv }:
|
2016-04-14 02:32:52 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "daemontools-0.76";
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2016-04-14 02:32:52 +02:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://cr.yp.to/daemontools/${name}.tar.gz";
|
|
|
|
sha256 = "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5";
|
|
|
|
};
|
2017-06-01 00:57:15 +02:00
|
|
|
|
|
|
|
patches = [ ./fix-nix-usernamespace-build.patch ];
|
|
|
|
|
2016-04-14 02:32:52 +02:00
|
|
|
configurePhase = ''
|
|
|
|
cd ${name}
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2016-08-30 02:11:09 +02:00
|
|
|
sed -ie '1 s_$_ -include ${glibc.dev}/include/errno.h_' src/conf-cc
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2016-04-14 02:32:52 +02:00
|
|
|
substituteInPlace src/Makefile \
|
|
|
|
--replace '/bin/sh' '${bash}/bin/bash -oxtrace'
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2016-04-14 02:32:52 +02:00
|
|
|
sed -ie "s_^PATH=.*_PATH=$src/${name}/compile:''${PATH}_" src/rts.tests
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2016-08-30 02:11:09 +02:00
|
|
|
cat ${glibc.dev}/include/errno.h
|
2016-04-14 02:32:52 +02:00
|
|
|
'';
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2016-04-14 02:32:52 +02:00
|
|
|
buildPhase = ''
|
|
|
|
package/compile
|
|
|
|
'';
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2016-04-14 02:32:52 +02:00
|
|
|
installPhase = ''
|
|
|
|
for cmd in $(cat package/commands); do
|
|
|
|
install -Dm755 "command/$cmd" "$out/bin/$cmd"
|
|
|
|
done
|
|
|
|
'';
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2016-04-14 02:32:52 +02:00
|
|
|
meta = {
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.publicDomain;
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://cr.yp.to/daemontools.html";
|
2020-10-11 07:55:05 +02:00
|
|
|
description = "A collection of tools for managing UNIX services";
|
2017-06-01 00:57:15 +02:00
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
maintainers = with lib.maintainers; [ kevincox ];
|
|
|
|
platforms = lib.platforms.unix;
|
2016-04-14 02:32:52 +02:00
|
|
|
};
|
|
|
|
}
|