Merge pull request #89330 from afontaine/build-runit-on-darwin
runit: Add Darwin Compatibility
This commit is contained in:
commit
977c6ac9d2
1 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl
|
{ stdenv, fetchurl, darwin
|
||||||
|
|
||||||
# Build runit-init as a static binary
|
# Build runit-init as a static binary
|
||||||
, static ? false
|
, static ? false
|
||||||
|
@ -23,7 +23,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
doCheck = true;
|
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 = ''
|
postPatch = ''
|
||||||
sed -i "s,\(#define RUNIT\) .*,\1 \"$out/bin/runit\"," src/runit.h
|
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
|
# Both of these are originally hard-coded to gcc
|
||||||
echo ${stdenv.cc.targetPrefix}cc > conf-cc
|
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 = ''
|
installPhase = ''
|
||||||
|
@ -55,6 +56,6 @@ stdenv.mkDerivation rec {
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
homepage = "http://smarden.org/runit";
|
homepage = "http://smarden.org/runit";
|
||||||
maintainers = with maintainers; [ joachifm ];
|
maintainers = with maintainers; [ joachifm ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue