2017-09-09 23:59:04 +02:00
|
|
|
{ stdenv, fetchFromGitHub, zlib }:
|
2017-08-12 16:22:45 +02:00
|
|
|
|
2017-03-23 15:10:34 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2017-08-12 16:22:45 +02:00
|
|
|
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'';
|
2017-08-13 00:53:29 +02:00
|
|
|
license = licenses.bsd3;
|
2017-03-23 15:10:34 +01:00
|
|
|
maintainers = with maintainers; [ raskin ];
|
|
|
|
platforms = with platforms; unix;
|
|
|
|
};
|
|
|
|
}
|