nixpkgs-suyu/pkgs/tools/misc/fontforge/fontforge-fonttools.nix

33 lines
849 B
Nix
Raw Normal View History

2017-09-09 23:59:04 +02:00
{ stdenv, fetchFromGitHub, zlib }:
2017-03-23 15:10:34 +01:00
stdenv.mkDerivation rec {
version = "20160404";
name = "fontforge-fonttools-${version}";
src = fetchFromGitHub {
owner = "fontforge";
repo = "fontforge";
rev = version;
sha256 = "15nacq84n9gvlzp3slpmfrrbh57kfb6lbdlc46i7aqgci4qv6fg0";
};
2017-03-23 15:10:34 +01:00
2017-09-09 23:59:04 +02:00
buildInputs = [ zlib ];
2017-03-23 15:10:34 +01:00
setSourceRoot = ''export sourceRoot="$(echo */contrib/fonttools)"'';
installPhase = ''
mkdir -p "$out"/{bin,share/doc/fontforge-fonttools}
for i in *.c; do
2017-09-09 23:59:04 +02:00
$CC "$i" -lz -lm --std=c99 -o "$out"/bin/$(basename "$i" .c)
2017-03-23 15:10:34 +01:00
done
cp README* "$out/share/doc/fontforge-fonttools"
'';
meta = with stdenv.lib; {
description = ''Small font tools shipped in FontForge contrib'';
license = licenses.bsd3;
2017-03-23 15:10:34 +01:00
maintainers = with maintainers; [ raskin ];
platforms = with platforms; unix;
};
}