1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-23 18:37:02 +00:00
nixpkgs/pkgs/tools/admin/daemontools/default.nix

45 lines
1.1 KiB
Nix
Raw Normal View History

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