nixpkgs/pkgs/data/fonts/input-fonts/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

50 lines
1.7 KiB
Nix

{ lib, stdenv, requireFile, unzip }:
stdenv.mkDerivation {
pname = "input-fonts";
version = "2019-11-25"; # date of the download and checksum
src = requireFile {
name = "Input-Font.zip";
url = "https://input.fontbureau.com/download/";
sha256 = "10rax2a7vzidcs7kyfg5lv5bwp9i7kvjpdcsd10p0517syijkp3b";
};
nativeBuildInputs = [ unzip ];
phases = [ "unpackPhase" "installPhase" ];
sourceRoot = ".";
installPhase = ''
mkdir -p $out/share/fonts/truetype
find Input_Fonts -name "*.ttf" -exec cp -a {} "$out"/share/fonts/truetype/ \;
mkdir -p "$out"/share/doc
cp -a *.txt "$out"/share/doc/
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "15sdhqqqd4jgk80fw7ncx49avi9cxbdgyrvnrfya0066x4q4r6lv";
meta = with lib; {
description = "Fonts for Code, from Font Bureau";
longDescription = ''
Input is a font family designed for computer programming, data,
and text composition. It was designed by David Jonathan Ross
between 2012 and 2014 and published by The Font Bureau. It
contains a wide array of styles so you can fine-tune the
typography that works best in your editing environment.
Input Mono is a monospaced typeface, where all characters occupy
a fixed width. Input Sans and Serif are proportional typefaces
that are designed with all of the features of a good monospace
generous spacing, large punctuation, and easily distinguishable
characters but without the limitations of a fixed width.
'';
homepage = "https://input.fontbureau.com";
license = licenses.unfree;
maintainers = with maintainers; [ romildo ];
platforms = platforms.all;
};
}