@@ -1,25 +1,24 @@
1−{ stdenv, fetchurl, premake5, hostPlatform }:
1+{ stdenv, fetchFromGitHub, premake5, ninja, hostPlatform }:
22
33stdenv.mkDerivation rec {
44 name = "otfcc-${version}";
55 version = "0.8.6";
66
7− src = fetchurl {
8− url = "https://github.com/caryll/otfcc/archive/v${version}.tar.gz";
9− sha256 = "0kap52bzrn21fmph8j2pc71f80f38ak1p2fcczzmrh0hb1r9c8dd";
7+ src = fetchFromGitHub {
8+ owner = "caryll";
9+ repo = "otfcc";
10+ rev = "v${version}";
11+ sha256 = "0yy9awffxxs0cdlf0akld73ndnwmylxvplac4k6j7641m3vk1g8p";
1012 };
1113
12− nativeBuildInputs = [ premake5 ];
14+ nativeBuildInputs = [ premake5 ninja ];
1315
1416 configurePhase = ''
15− premake5 gmake
17+ premake5 ninja
1618 '';
1719
18− preBuild = "cd build/gmake";
19−
20− makeFlags = ''config=release_${if hostPlatform.isi686 then "x86" else "x64"}'';
21−
22− postBuild = "cd ../..";
20+ ninjaFlags = let x = if hostPlatform.isi686 then "x86" else "x64"; in
21+ [ "-C" "build/ninja" "otfccdump_release_${x}" "otfccbuild_release_${x}" ];
2322
2423 installPhase = ''
2524 mkdir -p $out/bin