mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
61 lines
1.7 KiB
Nix
61 lines
1.7 KiB
Nix
{ stdenv
|
|
, fetchFromGitHub
|
|
, lib
|
|
, makeWrapper
|
|
, autoreconfHook
|
|
, 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)
|
|
*/
|
|
|
|
stdenv.mkDerivation (finalAttrs: 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 finalAttrs.buildInputs}
|
|
'';
|
|
|
|
# experimental texlive.combine support
|
|
# (note that only the bin/ folder will be combined into texlive)
|
|
passthru.tlDeps = with texlive; [ kpathsea t1utils metafont ];
|
|
|
|
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;
|
|
};
|
|
})
|