diff options
author | Vincenzo Mantova <xworld21@users.sf.net> | 2021-03-27 20:31:18 +0000 |
---|---|---|
committer | Vincenzo Mantova <xworld21@users.sf.net> | 2021-04-11 15:15:58 +0100 |
commit | 69fefe9d376d6311e9543df2a832e8ed25fef900 (patch) | |
tree | 09b5f1de37ee79c1e236e67bddb8ee052ec73957 /pkgs/tools/typesetting | |
parent | d9e725e717210b22916cb98a1be801328b3d4996 (diff) | |
download | nixlib-69fefe9d376d6311e9543df2a832e8ed25fef900.tar nixlib-69fefe9d376d6311e9543df2a832e8ed25fef900.tar.gz nixlib-69fefe9d376d6311e9543df2a832e8ed25fef900.tar.bz2 nixlib-69fefe9d376d6311e9543df2a832e8ed25fef900.tar.lz nixlib-69fefe9d376d6311e9543df2a832e8ed25fef900.tar.xz nixlib-69fefe9d376d6311e9543df2a832e8ed25fef900.tar.zst nixlib-69fefe9d376d6311e9543df2a832e8ed25fef900.zip |
mftrace: init at 1.2.20
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r-- | pkgs/tools/typesetting/tex/mftrace/default.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/tex/mftrace/default.nix b/pkgs/tools/typesetting/tex/mftrace/default.nix new file mode 100644 index 000000000000..627b08436581 --- /dev/null +++ b/pkgs/tools/typesetting/tex/mftrace/default.nix @@ -0,0 +1,63 @@ +{ stdenv +, fetchFromGitHub +, lib +, makeWrapper +, autoreconfHook +, buildEnv +, python3 +, fontforge +, potrace +, texlive +}: + +/* + To use with a texlive distribution, ensure that the desired fonts and + the packages kpathsea, t1utils, metafont are available at runtime. + + Possible overrides: + - potrace = autotrace + - fontforge = ghostscript (limited functionality) + - fontforge = null (limited functionality) +*/ + +let self = stdenv.mkDerivation rec { + pname = "mftrace"; + version = "1.2.20"; + + # https://lilypond.org/download/sources/mftrace/mftrace-1.2.20.tar.gz + # is incomplete, fetch repo and use autoconf instead + # see https://github.com/hanwen/mftrace/issues/13 + src = fetchFromGitHub { + owner = "hanwen"; + repo = "mftrace"; + rev = "release/${version}"; + sha256 = "02ik25aczkbi10jrjlnxby3fmixxrwm2k5r4fkfif3bjfym7nqbc"; + }; + + nativeBuildInputs = [ makeWrapper autoreconfHook python3 potrace ]; + + buildInputs = [ fontforge potrace ]; + + postInstall = '' + wrapProgram $out/bin/mftrace --prefix PATH : ${lib.makeBinPath buildInputs} + ''; + + # experimental texlive.combine support + # (note that only the bin/ folder will be combined into texlive) + passthru.tlType = "bin"; + passthru.pkgs = [ self ] ++ + (with texlive; kpathsea.pkgs ++ t1utils.pkgs ++ metafont.pkgs); + + meta = with lib; { + description = "Scalable PostScript Fonts for MetaFont"; + longDescription = '' + mftrace is a small Python program that lets you trace a TeX bitmap + font into a PFA or PFB font (A PostScript Type1 Scalable Font) or + TTF (TrueType) font. + ''; + homepage = "https://lilypond.org/mftrace/"; + license = with licenses; [ gpl2Only mit ]; + maintainers = with maintainers; [ xworld21 ]; + platforms = platforms.all; + }; +}; in self |