2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, Foundation, readline }:
|
2017-03-29 03:09:26 +01:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
with lib;
|
2017-03-29 03:09:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "premake5";
|
2017-12-04 05:54:37 +00:00
|
|
|
version = "5.0.0-alpha12";
|
2017-03-29 03:09:26 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "premake";
|
|
|
|
repo = "premake-core";
|
2017-12-04 05:54:37 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1h3hr96pdz94njn4bg02ldcz0k5j1x017d8svc7fdyvl2b77nqzf";
|
2017-03-29 03:09:26 +01:00
|
|
|
};
|
|
|
|
|
2017-12-07 09:41:46 +00:00
|
|
|
buildInputs = optionals stdenv.isDarwin [ Foundation readline ];
|
2017-03-29 03:09:26 +01: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
|
|
|
|
'';
|
|
|
|
|
2018-11-27 00:00:08 +00:00
|
|
|
premake_cmd = "premake5";
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
|
2017-03-29 03:09:26 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://premake.github.io";
|
2017-03-29 03:09:26 +01:00
|
|
|
description = "A simple build configuration and project generation tool using lua";
|
2021-01-23 12:26:19 +00:00
|
|
|
license = lib.licenses.bsd3;
|
2017-03-29 03:09:26 +01:00
|
|
|
platforms = platforms.darwin ++ platforms.linux;
|
|
|
|
};
|
|
|
|
}
|