summary refs log blame commit diff
path: root/pkgs/tools/misc/otfcc/default.nix
blob: b233e94f4f60ff5baaade3953fcf4c058399fdb3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                           

                         
                  
                     
 



                         
                                                                    

    
                                   
 




                          
                                                                      
 

                     
                                     

     

                                
                    
                                                             
                                                 
                             
                               
                                                           


    
{ lib, 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 = lib.optional stdenv.isAarch64 [ "config=release_arm" ];

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

  enableParallelBuilding = true;

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

}