3
0
Fork 0
forked from mirrors/nixpkgs

daemontools: fix build

This commit is contained in:
Jörg Thalheim 2017-05-31 23:57:15 +01:00
parent bef0b67a84
commit d7f6367471
No known key found for this signature in database
GPG key ID: CA4106B8D7CC79FA
2 changed files with 22 additions and 10 deletions

View file

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

View file

@ -0,0 +1,10 @@
--- admin.org/daemontools-0.76/src/chkshsgr.c 2001-07-12 17:49:49.000000000 +0100
+++ admin/daemontools-0.76/src/chkshsgr.c 2017-05-31 23:54:56.662174028 +0100
@@ -4,6 +4,7 @@
int main()
{
+ return 0;
short x[4];
x[0] = x[1] = 0;