From 08a035725f47b69d82c72f8c1ea48d04c53390fa Mon Sep 17 00:00:00 2001 From: Kevin Cox Date: Wed, 13 Apr 2016 20:32:52 -0400 Subject: [PATCH] daemontools: init at 0.76 (#14675) --- pkgs/tools/admin/daemontools/default.nix | 42 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/tools/admin/daemontools/default.nix diff --git a/pkgs/tools/admin/daemontools/default.nix b/pkgs/tools/admin/daemontools/default.nix new file mode 100644 index 000000000000..08f21dc62622 --- /dev/null +++ b/pkgs/tools/admin/daemontools/default.nix @@ -0,0 +1,42 @@ +{ fetchurl, bash, glibc, stdenv }: + +stdenv.mkDerivation rec { + name = "daemontools-0.76"; + + src = fetchurl { + url = "https://cr.yp.to/daemontools/${name}.tar.gz"; + sha256 = "07scvw88faxkscxi91031pjkpccql6wspk4yrlnsbrrb5c0kamd5"; + }; + + configurePhase = '' + cd ${name} + + sed -ie '1 s_$_ -include ${glibc}/include/errno.h_' src/conf-cc + + substituteInPlace src/Makefile \ + --replace '/bin/sh' '${bash}/bin/bash -oxtrace' + + sed -ie "s_^PATH=.*_PATH=$src/${name}/compile:''${PATH}_" src/rts.tests + + cat ${glibc}/include/errno.h + ''; + + buildPhase = '' + package/compile + ''; + + installPhase = '' + for cmd in $(cat package/commands); do + install -Dm755 "command/$cmd" "$out/bin/$cmd" + done + ''; + + meta = { + license = stdenv.lib.licenses.publicDomain; + homepage = https://cr.yp.to/daemontools.html; + description = "A collection of tools for managing UNIX services."; + + maintainers = with stdenv.lib.maintainers; [ kevincox ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b54fb2f892d0..a86e51933c7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -696,6 +696,8 @@ in cpulimit = callPackage ../tools/misc/cpulimit { }; contacts = callPackage ../tools/misc/contacts { }; + + daemontools = callPackage ../tools/admin/daemontools { }; datamash = callPackage ../tools/misc/datamash { };