nixpkgs/pkgs/servers/s6/default.nix
Patrick Mahoney f254687071 s6: new package
s6 is skarnet.org's small & secure supervision software suite.

The s6-log program is modified to call execlineb directly rather than
searching PATH.
2014-08-22 23:42:13 -05:00

58 lines
1.4 KiB
Nix

{stdenv, fetchurl, skalibs, execline}:
let
version = "1.1.3.2";
in stdenv.mkDerivation rec {
name = "s6-${version}";
src = fetchurl {
url = "http://www.skarnet.org/software/s6/${name}.tar.gz";
sha256 = "0djxdd3d3mlp63sjqqs0ilf8p68m86c1s98d82fl0kgaaibpsikp";
};
buildInputs = [ skalibs execline ];
sourceRoot = "admin/${name}";
configurePhase = ''
pushd conf-compile
printf "$out/bin" > conf-install-command
printf "$out/include" > conf-install-include
printf "$out/lib" > conf-install-library
printf "$out/lib" > conf-install-library.so
printf "$out/sysdeps" > conf-install-sysdeps
# let nix builder strip things, cross-platform
truncate --size 0 conf-stripbins
truncate --size 0 conf-striplibs
printf "${skalibs}/sysdeps" > import
printf "%s\n%s" "${skalibs}/include" "${execline}/include" > path-include
printf "%s\n%s" "${skalibs}/lib" "${execline}/lib" > path-library
rm -f flag-slashpackage
touch flag-allstatic
popd
'';
preBuild = ''
substituteInPlace "src/daemontools-extras/s6-log.c" \
--replace '"execlineb"' '"${execline}/bin/execlineb"'
patchShebangs src/sys
'';
meta = {
homepage = http://www.skarnet.org/software/s6/;
description = "skarnet.org's small & secure supervision software suite.";
platforms = stdenv.lib.platforms.all;
license = stdenv.lib.licenses.isc;
};
}