nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchzip, xorg }:
2
3stdenv.mkDerivation {
4 pname = "profont";
5 version = "2019-11";
6
7 # Note: stripRoot doesn't work because the archive
8 # contains the metadata directory `__MACOSX`.
9 src = fetchzip {
10 url = "https://tobiasjung.name/downloadfile.php?file=profont-x11.zip";
11 sha256 = "12dbm87wvcpmn7nzgzwlk45cybp091diara8blqm6129ps27z6kb";
12 stripRoot = false;
13 } + /profont-x11;
14
15 srcOtb = fetchzip {
16 url = "https://tobiasjung.name/downloadfile.php?file=profont-otb.zip";
17 sha256 = "18rfhfqrsj3510by0w1a7ak5as6r2cxh8xv02xc1y30mfa6g24x6";
18 stripRoot = false;
19 } + /profont-otb;
20
21 dontBuild = true;
22
23 nativeBuildInputs = [ xorg.mkfontscale ];
24
25 installPhase = ''
26 mkdir -p "$out/share/fonts/misc"
27 for f in *.pcf; do
28 gzip -n -9 -c "$f" > "$out/share/fonts/misc/$f.gz"
29 done
30 install -D -m 644 LICENSE -t "$out/share/doc/$pname"
31 install -D -m 644 "$srcOtb/profontn.otb" -t $out/share/fonts/misc
32 mkfontdir "$out/share/fonts/misc"
33 '';
34
35 meta = with lib; {
36 homepage = "https://tobiasjung.name/profont/";
37 description = "A monospaced font created to be a most readable font for programming";
38 maintainers = with maintainers; [ myrl ];
39 license = licenses.mit;
40 platforms = platforms.all;
41 };
42
43}