diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2020-06-03 14:44:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 14:44:59 +0100 |
commit | 977c6ac9d2c1bd216771f038fd2eef09e76cc9ca (patch) | |
tree | d8d44bcb2ad2e850f646064258c91434d23bdb3d /pkgs | |
parent | aef2bc1330982264cb533896557bd547e6b39ec7 (diff) | |
parent | 98bb827799a3a61f7b4ccc09b9849eaf579312d5 (diff) | |
download | nixlib-977c6ac9d2c1bd216771f038fd2eef09e76cc9ca.tar nixlib-977c6ac9d2c1bd216771f038fd2eef09e76cc9ca.tar.gz nixlib-977c6ac9d2c1bd216771f038fd2eef09e76cc9ca.tar.bz2 nixlib-977c6ac9d2c1bd216771f038fd2eef09e76cc9ca.tar.lz nixlib-977c6ac9d2c1bd216771f038fd2eef09e76cc9ca.tar.xz nixlib-977c6ac9d2c1bd216771f038fd2eef09e76cc9ca.tar.zst nixlib-977c6ac9d2c1bd216771f038fd2eef09e76cc9ca.zip |
Merge pull request #89330 from afontaine/build-runit-on-darwin
runit: Add Darwin Compatibility
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/system/runit/default.nix | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/tools/system/runit/default.nix b/pkgs/tools/system/runit/default.nix index a4319fd57496..acca0acf3ef9 100644 --- a/pkgs/tools/system/runit/default.nix +++ b/pkgs/tools/system/runit/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ stdenv, fetchurl, darwin # Build runit-init as a static binary , static ? false @@ -23,7 +23,8 @@ stdenv.mkDerivation rec { doCheck = true; - buildInputs = stdenv.lib.optionals static [ stdenv.cc.libc stdenv.cc.libc.static ]; + buildInputs = stdenv.lib.optionals static [ stdenv.cc.libc stdenv.cc.libc.static ] ++ + stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp; postPatch = '' sed -i "s,\(#define RUNIT\) .*,\1 \"$out/bin/runit\"," src/runit.h @@ -39,7 +40,7 @@ stdenv.mkDerivation rec { # Both of these are originally hard-coded to gcc echo ${stdenv.cc.targetPrefix}cc > conf-cc - echo ${stdenv.cc.targetPrefix}cc > conf-ld + echo ${stdenv.cc.targetPrefix}cc ${stdenv.lib.optionalString stdenv.isDarwin "-Xlinker -x "}> conf-ld ''; installPhase = '' @@ -55,6 +56,6 @@ stdenv.mkDerivation rec { license = licenses.bsd3; homepage = "http://smarden.org/runit"; maintainers = with maintainers; [ joachifm ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } |