2017-12-04 05:42:17 +00:00
|
|
|
{ stdenv, fetchFromGitHub, premake5, ninja, hostPlatform }:
|
2017-07-22 21:33:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "otfcc-${version}";
|
|
|
|
version = "0.8.6";
|
|
|
|
|
2017-12-04 05:42:17 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "caryll";
|
|
|
|
repo = "otfcc";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0yy9awffxxs0cdlf0akld73ndnwmylxvplac4k6j7641m3vk1g8p";
|
2017-07-22 21:33:37 +00:00
|
|
|
};
|
|
|
|
|
2017-12-04 05:42:17 +00:00
|
|
|
nativeBuildInputs = [ premake5 ninja ];
|
2017-07-22 21:33:37 +00:00
|
|
|
|
|
|
|
configurePhase = ''
|
2017-12-04 05:42:17 +00:00
|
|
|
premake5 ninja
|
2017-07-22 21:33:37 +00:00
|
|
|
'';
|
|
|
|
|
2017-12-04 05:42:17 +00:00
|
|
|
ninjaFlags = let x = if hostPlatform.isi686 then "x86" else "x64"; in
|
|
|
|
[ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ];
|
2017-07-22 21:33:37 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp bin/release-x*/otfcc* $out/bin/
|
|
|
|
'';
|
|
|
|
|
2017-11-27 00:07:53 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2017-07-22 21:33:37 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Optimized OpenType builder and inspector";
|
|
|
|
homepage = https://github.com/caryll/otfcc;
|
|
|
|
license = licenses.asl20;
|
2017-11-27 00:07:53 +00:00
|
|
|
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
|
2017-11-20 17:06:51 +00:00
|
|
|
maintainers = with maintainers; [ jfrankenau ttuegel ];
|
2017-07-22 21:33:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|