summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/system/runit/default.nix8
1 files changed, 6 insertions, 2 deletions
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
   '';