2017-12-07 10:41:46 +01:00
|
|
|
{ stdenv, fetchFromGitHub, Foundation, readline }:
|
2017-03-29 04:09:26 +02:00
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2017-12-04 06:54:37 +01:00
|
|
|
name = "premake5-${version}";
|
|
|
|
version = "5.0.0-alpha12";
|
2017-03-29 04:09:26 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "premake";
|
|
|
|
repo = "premake-core";
|
2017-12-04 06:54:37 +01:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1h3hr96pdz94njn4bg02ldcz0k5j1x017d8svc7fdyvl2b77nqzf";
|
2017-03-29 04:09:26 +02:00
|
|
|
};
|
|
|
|
|
2017-12-07 10:41:46 +01:00
|
|
|
buildInputs = optionals stdenv.isDarwin [ Foundation readline ];
|
2017-03-29 04:09:26 +02:00
|
|
|
|
|
|
|
patchPhase = optional stdenv.isDarwin ''
|
|
|
|
substituteInPlace premake5.lua \
|
|
|
|
--replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.5
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase =
|
|
|
|
if stdenv.isDarwin then ''
|
|
|
|
make -f Bootstrap.mak osx
|
|
|
|
'' else ''
|
|
|
|
make -f Bootstrap.mak linux
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 bin/release/premake5 $out/bin/premake5
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://premake.github.io;
|
|
|
|
description = "A simple build configuration and project generation tool using lua";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
platforms = platforms.darwin ++ platforms.linux;
|
|
|
|
};
|
|
|
|
}
|