forked from mirrors/nixpkgs
plan9port: build everything on Darwin
A commit in 2014 (see #2266) disabled building parts which depended on X11 on Mac OS. There's no explanation given in the pull request. In any case, many people install plan9port on Darwin specifically to use the UI components. Aside from this, the derivation was broken on Mac OS, probably because people put the `which` and `perl` dependencies inside the !isDarwin conditional. Some programs worked, however the static libraries did not build, so this could not be used as a buildInput to build programs which need the libraries. This fixes that.
This commit is contained in:
parent
9d11c30cf9
commit
26aef37424
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||
--replace "case Kcmd+'v':" "case 0x16: case Kcmd+'v':"
|
||||
'';
|
||||
|
||||
buildInputs = stdenv.lib.optionals (!stdenv.isDarwin) [
|
||||
buildInputs = [
|
||||
which perl libX11 fontconfig xorgproto libXt libXext
|
||||
freetype # fontsrv wants ft2build.h provides system fonts for acme and sam.
|
||||
];
|
||||
|
@ -60,6 +60,27 @@ stdenv.mkDerivation rec {
|
|||
NIX_LDFLAGS="-lgcc_s";
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
$out/bin/9 rc -c 'echo rc is working.'
|
||||
|
||||
# 9l can find and use its libs
|
||||
cd $TMP
|
||||
cat >test.c <<EOF
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include <thread.h>
|
||||
void
|
||||
threadmain(int argc, char **argv)
|
||||
{
|
||||
threadexitsall(nil);
|
||||
}
|
||||
EOF
|
||||
$out/bin/9 9c -o test.o test.c
|
||||
$out/bin/9 9l -o test test.o
|
||||
./test
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://9fans.github.io/plan9port/;
|
||||
description = "Plan 9 from User Space";
|
||||
|
|
Loading…
Reference in a new issue