nixpkgs/pkgs/by-name/te/terminus_font/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

50 lines
1.6 KiB
Nix

{ lib, stdenv, fetchurl, python3
, bdftopcf, xorg
}:
stdenv.mkDerivation rec {
pname = "terminus-font";
version = "4.49.1";
src = fetchurl {
url = "mirror://sourceforge/project/${pname}/${pname}-${lib.versions.majorMinor version}/${pname}-${version}.tar.gz";
sha256 = "0yggffiplk22lgqklfmd2c0rw8gwchynjh5kz4bz8yv2h6vw2qfr";
};
patches = [ ./SOURCE_DATE_EPOCH-for-otb.patch ];
nativeBuildInputs =
[ python3 bdftopcf xorg.mkfontscale ];
enableParallelBuilding = true;
postPatch = ''
substituteInPlace Makefile --replace 'fc-cache' '#fc-cache'
substituteInPlace Makefile --replace 'gzip' 'gzip -n'
'';
installTargets = [ "install" "install-otb" "fontdir" ];
# fontdir depends on the previous two targets, but this is not known
# to make, so we need to disable parallelism:
enableParallelInstalling = false;
meta = with lib; {
description = "Clean fixed width font";
longDescription = ''
Terminus Font is designed for long (8 and more hours per day) work
with computers. Version 4.30 contains 850 characters, covers about
120 language sets and supports ISO8859-1/2/5/7/9/13/15/16,
Paratype-PT154/PT254, KOI8-R/U/E/F, Esperanto, many IBM, Windows and
Macintosh code pages, as well as the IBM VGA, vt100 and xterm
pseudographic characters.
The sizes present are 6x12, 8x14, 8x16, 10x20, 11x22, 12x24, 14x28 and
16x32. The styles are normal and bold (except for 6x12), plus
EGA/VGA-bold for 8x14 and 8x16.
'';
homepage = "https://terminus-font.sourceforge.net/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ astsmtl ];
};
}