1 { lib, stdenv, fetchFromGitHub, premake4, bootil }:
3 stdenv.mkDerivation rec {
5 version = "unstable-2020-02-24";
8 description = "Garry's Mod Addon Creator and Extractor";
9 homepage = "https://github.com/Facepunch/gmad";
10 license = lib.licenses.unfree;
11 maintainers = [ lib.maintainers.abigailbuccaneer ];
12 platforms = lib.platforms.all;
15 src = fetchFromGitHub {
18 rev = "5236973a2fcbb3043bdd3d4529ce68b6d938ad93";
19 sha256="04an17nvnj38mpi0w005v41ib8ynb5qhgrdkmsda4hq7l1gn276s";
22 buildInputs = [ premake4 bootil ];
25 if stdenv.hostPlatform.isLinux then "gmad_linux"
26 else if stdenv.hostPlatform.isDarwin then "gmad_osx"
29 premakeFlags = [ "--bootil_lib=${bootil}/lib" "--bootil_inc=${bootil}/include" ];
33 cp ${targetName} $out/bin/gmad