3
0
Fork 0
forked from mirrors/nixpkgs

runit: optionally build static runit{,-init}

May be useful in initrd along with statically linked busybox.
This commit is contained in:
Joachim Fasting 2016-08-27 11:19:50 +02:00
parent 1cabee5973
commit 525b250052
No known key found for this signature in database
GPG key ID: 7544761007FE4E08

View file

@ -1,4 +1,6 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl
, static ? false
}:
stdenv.mkDerivation rec {
name = "runit-${version}";
@ -15,7 +17,9 @@ stdenv.mkDerivation rec {
doCheck = true;
postPatch = ''
buildInputs = stdenv.lib.optionals static [ stdenv.cc.libc stdenv.cc.libc.static ];
postPatch = stdenv.lib.optionalString (!static) ''
sed -i 's,-static,,g' src/Makefile
'';