2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, premake4, bootil }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-06-28 23:13:55 +00:00
|
|
|
pname = "gmad";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "unstable-2020-02-24";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Garry's Mod Addon Creator and Extractor";
|
2022-06-16 17:23:12 +00:00
|
|
|
homepage = "https://github.com/Facepunch/gmad";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.unfree;
|
|
|
|
maintainers = [ lib.maintainers.abigailbuccaneer ];
|
|
|
|
platforms = lib.platforms.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-06-16 17:23:12 +00:00
|
|
|
owner = "Facepunch";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "gmad";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "5236973a2fcbb3043bdd3d4529ce68b6d938ad93";
|
|
|
|
sha256="04an17nvnj38mpi0w005v41ib8ynb5qhgrdkmsda4hq7l1gn276s";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ premake4 bootil ];
|
|
|
|
|
|
|
|
targetName =
|
|
|
|
if stdenv.isLinux then "gmad_linux"
|
|
|
|
else if stdenv.isDarwin then "gmad_osx"
|
|
|
|
else "gmad";
|
|
|
|
|
|
|
|
premakeFlags = [ "--bootil_lib=${bootil}/lib" "--bootil_inc=${bootil}/include" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp ${targetName} $out/bin/gmad
|
|
|
|
'';
|
|
|
|
}
|