summary refs log tree commit diff
path: root/pkgs/tools/misc/otfcc/default.nix
blob: f55f4e53296d54e804731498eb2e790bc8ec5571 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ stdenv, fetchurl, premake5, hostPlatform }:

stdenv.mkDerivation rec {
  name = "otfcc-${version}";
  version = "0.8.6";

  src = fetchurl {
    url = "https://github.com/caryll/otfcc/archive/v${version}.tar.gz";
    sha256 = "0kap52bzrn21fmph8j2pc71f80f38ak1p2fcczzmrh0hb1r9c8dd";
  };

  nativeBuildInputs = [ premake5 ];

  configurePhase = ''
    premake5 gmake
  '';

  preBuild = "cd build/gmake";

  makeFlags = ''config=release_${if hostPlatform.isi686 then "x86" else "x64"}'';

  postBuild = "cd ../..";

  installPhase = ''
    mkdir -p $out/bin
    cp bin/release-x*/otfcc* $out/bin/
  '';

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    description = "Optimized OpenType builder and inspector";
    homepage = https://github.com/caryll/otfcc;
    license = licenses.asl20;
    platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
    maintainers = with maintainers; [ jfrankenau ttuegel ];
  };

}