aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/tools/misc/otfcc/default.nix
blob: dc7e3effe0a1c0c169771eec2fd35d68de06edf0 (plain)
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
{ stdenv, fetchFromGitHub, premake5 }:

stdenv.mkDerivation rec {
  pname = "otfcc";
  version = "0.10.4";

  src = fetchFromGitHub {
    owner = "caryll";
    repo = "otfcc";
    rev = "v${version}";
    sha256 = "1nrkzpqklfpqsccji4ans40rj88l80cv7dpxwx4g577xrvk13a0f";
  };

  nativeBuildInputs = [ premake5 ];

  patches = [
    ./fix-aarch64.patch
    ./move-makefiles.patch
  ];

  buildFlags = stdenv.lib.optional stdenv.isAarch64 [ "config=release_arm" ];

  installPhase = ''
    mkdir -p $out/bin
    cp bin/release-*/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 = [ "aarch64-linux" "i686-linux" "x86_64-linux" "x86_64-darwin" ];
    maintainers = with maintainers; [ jfrankenau ttuegel ];
  };

}