1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-05 03:53:41 +00:00
nixpkgs/pkgs/development/tools/misc/premake/5.nix
Matthew Bauer fd78464de9 premake: add setup-hook
Adds a configure phase for packages using premake.
premakeConfigurePhase runs the correct premake version for the premake
you are using (see premake_cmd).
2018-11-28 20:14:29 -06:00

44 lines
1.1 KiB
Nix

{ stdenv, fetchFromGitHub, Foundation, readline }:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "premake5-${version}";
version = "5.0.0-alpha12";
src = fetchFromGitHub {
owner = "premake";
repo = "premake-core";
rev = "v${version}";
sha256 = "1h3hr96pdz94njn4bg02ldcz0k5j1x017d8svc7fdyvl2b77nqzf";
};
buildInputs = optionals stdenv.isDarwin [ Foundation readline ];
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
'';
premake_cmd = "premake5";
setupHook = ./setup-hook.sh;
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;
};
}