Merge pull request #51205 from matthewbauer/more-setup-hooks
Add premake & imake setup hook
This commit is contained in:
@@ -8,6 +8,7 @@ stdenv.mkDerivation {
|
||||
url = https://www.x.org/releases/individual/lib/libXaw3d-1.6.3.tar.bz2;
|
||||
sha256 = "0i653s8g25cc0mimkwid9366bqkbyhdyjhckx7bw77j20hzrkfid";
|
||||
};
|
||||
dontUseImakeConfigure = true;
|
||||
nativeBuildInputs = [ pkgconfig bison flex imake gccmakedep ];
|
||||
buildInputs = [ libXpm libXp ];
|
||||
propagatedBuildInputs = [ xlibsWrapper libXmu ];
|
||||
|
||||
@@ -23,21 +23,21 @@ stdenv.mkDerivation rec {
|
||||
url = https://github.com/garrynewman/bootil/pull/22.patch;
|
||||
name = "github-pull-request-22.patch";
|
||||
sha256 = "1qf8wkv00pb9w1aa0dl89c8gm4rmzkxfl7hidj4gz0wpy7a24qa2";
|
||||
})];
|
||||
}) ];
|
||||
|
||||
platform =
|
||||
if stdenv.isLinux then "linux"
|
||||
else if stdenv.isDarwin then "macosx"
|
||||
else throw "unrecognized system ${stdenv.hostPlatform.system}";
|
||||
# Avoid guessing where files end up. Just use current directory.
|
||||
postPatch = ''
|
||||
substituteInPlace projects/premake4.lua \
|
||||
--replace 'location ( os.get() .. "/" .. _ACTION )' 'location ( ".." )'
|
||||
substituteInPlace projects/bootil.lua \
|
||||
--replace 'targetdir ( "../lib/" .. os.get() .. "/" .. _ACTION )' 'targetdir ( ".." )'
|
||||
'';
|
||||
|
||||
buildInputs = [ premake4 ];
|
||||
|
||||
configurePhase = "premake4 --file=projects/premake4.lua gmake";
|
||||
makeFlags = "-C projects/${platform}/gmake";
|
||||
nativeBuildInputs = [ premake4 ];
|
||||
premakefile = "projects/premake4.lua";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib
|
||||
cp lib/${platform}/gmake/libbootil_static.a $out/lib/
|
||||
cp -r include $out/
|
||||
install -D libbootil_static.a $out/lib/libbootil_static.a
|
||||
cp -r include $out
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -15,9 +15,7 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ premake5 doxygen ];
|
||||
propagatedBuildInputs = [ libsodium mbedtls ];
|
||||
|
||||
buildPhase = ''
|
||||
premake5 gmake
|
||||
make all
|
||||
postBuild = ''
|
||||
premake5 docs
|
||||
'';
|
||||
|
||||
@@ -28,6 +26,8 @@ stdenv.mkDerivation rec {
|
||||
cp -r docs/html $out/share/doc/yojimbo
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A network library for client/server games with dedicated servers";
|
||||
longDescription = ''
|
||||
|
||||
Reference in New Issue
Block a user