otfcc: use premake setup hook

This commit is contained in:
Matthew Bauer 2018-11-27 01:42:54 -06:00
parent 0984032d6a
commit 9d2c6ea47a

View file

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, premake5, ninja }:
{ stdenv, fetchFromGitHub, premake5 }:
stdenv.mkDerivation rec {
name = "otfcc-${version}";
@ -11,15 +11,15 @@ stdenv.mkDerivation rec {
sha256 = "1rnjfqqyc6d9nhlh8if9k37wk94mcwz4wf3k239v6idg48nrk10b";
};
nativeBuildInputs = [ premake5 ninja ];
nativeBuildInputs = [ premake5 ];
configurePhase = ''
premake5 ninja
# Dont guess where our makefiles will end up. Just use current
# directory.
patchPhase = ''
substituteInPlace premake5.lua \
--replace 'location "build/gmake"' 'location "."'
'';
ninjaFlags = let x = if stdenv.hostPlatform.isi686 then "x86" else "x64"; in
[ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ];
installPhase = ''
mkdir -p $out/bin
cp bin/release-x*/otfcc* $out/bin/