summaryrefslogtreecommitdiff
path: root/pkgs/development/tools/misc/premake/default.nix
blob: 6ed590eb6293e845d35b6558826aecd851ae8334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  lib,
  stdenv,
  fetchurl,
  unzip,
}:

stdenv.mkDerivation rec {
  pname = "premake";
  version = "4.3";

  src = fetchurl {
    url = "mirror://sourceforge/premake/premake-${version}-src.zip";
    sha256 = "1017rd0wsjfyq2jvpjjhpszaa7kmig6q1nimw76qx3cjz2868lrn";
  };

  nativeBuildInputs = [ unzip ];

  buildPhase = ''
    make -C build/gmake.unix/
  '';

  installPhase = ''
    install -Dm755 bin/release/premake4 $out/bin/premake4
  '';

  premake_cmd = "premake4";
  setupHook = ./setup-hook.sh;

  meta = {
    description = "Simple build configuration and project generation tool using lua";
    homepage = "https://premake.github.io/";
    license = lib.licenses.bsd3;
    maintainers = [ lib.maintainers.bjornfor ];
    mainProgram = "premake4";
    platforms = lib.platforms.unix;
  };
}