From d9e725e717210b22916cb98a1be801328b3d4996 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova Date: Tue, 6 Apr 2021 13:05:14 +0100 Subject: [PATCH 1/2] maintainers: add xworld21 --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index e2bf9f5f49e..3005c02c467 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10638,6 +10638,12 @@ githubId = 11824817; name = "Marti Serra"; }; + xworld21 = { + email = "1962985+xworld21@users.noreply.github.com"; + github = "xworld21"; + githubId = 1962985; + name = "Vincenzo Mantova"; + }; xwvvvvwx = { email = "davidterry@posteo.de"; github = "xwvvvvwx"; From 69fefe9d376d6311e9543df2a832e8ed25fef900 Mon Sep 17 00:00:00 2001 From: Vincenzo Mantova Date: Sat, 27 Mar 2021 20:31:18 +0000 Subject: [PATCH 2/2] mftrace: init at 1.2.20 --- .../tools/typesetting/tex/mftrace/default.nix | 63 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 65 insertions(+) create mode 100644 pkgs/tools/typesetting/tex/mftrace/default.nix diff --git a/pkgs/tools/typesetting/tex/mftrace/default.nix b/pkgs/tools/typesetting/tex/mftrace/default.nix new file mode 100644 index 00000000000..627b0843658 --- /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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 583288f7a05..f6206b57933 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6039,6 +6039,8 @@ in mesa-demos = callPackage ../tools/graphics/mesa-demos { }; + mftrace = callPackage ../tools/typesetting/tex/mftrace { }; + mhonarc = perlPackages.MHonArc; minergate = callPackage ../applications/misc/minergate { };