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

33 lines
845 B
Nix
Raw Normal View History

{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
buildInputs = [zlib];
setSourceRoot = ''export sourceRoot="$(echo */contrib/fonttools)"'';
installPhase = ''
mkdir -p "$out"/{bin,share/doc/fontforge-fonttools}
for i in *.c; do
gcc "$i" -lz -lm --std=c99 -o "$out"/bin/$(basename "$i" .c)
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;
};
}