nixpkgs/pkgs/tools/admin/daemontools/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
Nix
Raw Normal View History

2021-01-15 10:19:50 +01:00
{ fetchurl, bash, glibc, lib, stdenv }:
2016-04-14 02:32:52 +02:00
stdenv.mkDerivation rec {
2021-08-12 21:47:47 +02:00
pname = "daemontools";
version = "0.76";
2017-06-01 00:57:15 +02:00
2016-04-14 02:32:52 +02:00
src = fetchurl {
2021-08-12 21:47:47 +02:00
url = "https://cr.yp.to/daemontools/daemontools-${version}.tar.gz";
2016-04-14 02:32:52 +02:00
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 = ''
2021-08-12 21:47:47 +02:00
cd daemontools-${version}
2017-06-01 00:57:15 +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
2021-08-12 21:47:47 +02:00
sed -ie "s_^PATH=.*_PATH=$src/daemontools-${version}/compile:''${PATH}_" src/rts.tests
2017-06-01 00:57:15 +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;
homepage = "https://cr.yp.to/daemontools.html";
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
};
}