runit: replace hardcoded /sbin/runit with in-store runit binary

runit-init calls the runit executable as /sbin/runit, which
obviously fails for us.

This should improve support for using runit as an init replacement.
This commit is contained in:
Joachim Fasting 2017-04-18 01:04:25 +02:00
parent 160b9ab43f
commit 5a04a30653
No known key found for this signature in database
GPG Key ID: 7544761007FE4E08

View File

@ -21,7 +21,9 @@ stdenv.mkDerivation rec {
buildInputs = stdenv.lib.optionals static [ stdenv.cc.libc stdenv.cc.libc.static ];
postPatch = stdenv.lib.optionalString (!static) ''
postPatch = ''
sed -i "s,\(#define RUNIT\) .*,\1 \"$out/bin/runit\"," src/runit.h
'' + stdenv.lib.optionalString (!static) ''
sed -i 's,-static,,g' src/Makefile
'';