diff --git a/pkgs/tools/misc/fontforge/default.nix b/pkgs/tools/misc/fontforge/default.nix index 2cccee0a4e3b9..cecd2ef3cf36f 100644 --- a/pkgs/tools/misc/fontforge/default.nix +++ b/pkgs/tools/misc/fontforge/default.nix @@ -57,6 +57,7 @@ stdenv.mkDerivation rec { description = "A font editor"; homepage = http://fontforge.github.io; platforms = stdenv.lib.platforms.all; + license = stdenv.lib.licenses.bsd3; }; } diff --git a/pkgs/tools/misc/fontforge/fontforge-fonttools.nix b/pkgs/tools/misc/fontforge/fontforge-fonttools.nix new file mode 100644 index 0000000000000..046c1d4492014 --- /dev/null +++ b/pkgs/tools/misc/fontforge/fontforge-fonttools.nix @@ -0,0 +1,24 @@ +{stdenv, fontforge, zlib}: +stdenv.mkDerivation rec { + name = "fontforge-fonttools-${fontforge.version}"; + src = fontforge.src; + + 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 = fontforge.meta.license; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e086fd0b153e1..f28f672eaba22 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1818,6 +1818,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Carbon Cocoa; }; + fontforge-fonttools = callPackage ../tools/misc/fontforge/fontforge-fonttools.nix {}; + fontmatrix = callPackage ../applications/graphics/fontmatrix {}; foremost = callPackage ../tools/system/foremost { };