From 525b250052482afc07d4b8ee2b5fca649f851879 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 27 Aug 2016 11:19:50 +0200 Subject: runit: optionally build static runit{,-init} May be useful in initrd along with statically linked busybox. --- pkgs/tools/system/runit/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pkgs/tools') diff --git a/pkgs/tools/system/runit/default.nix b/pkgs/tools/system/runit/default.nix index 87cf720b981e..54899cb14df5 100644 --- a/pkgs/tools/system/runit/default.nix +++ b/pkgs/tools/system/runit/default.nix @@ -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 ''; -- cgit 1.4.1