forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / data / fonts / profont / default.nix
bloba617d61cc98fa5c996c44a7251791ea83834695e
1 { lib, stdenv, fetchzip, xorg }:
3 stdenv.mkDerivation {
4   pname = "profont";
5   version = "2019-11";
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;
15   srcOtb = fetchzip {
16     url = "https://tobiasjung.name/downloadfile.php?file=profont-otb.zip";
17     sha256 = "18rfhfqrsj3510by0w1a7ak5as6r2cxh8xv02xc1y30mfa6g24x6";
18     stripRoot = false;
19   } + /profont-otb;
21   dontBuild = true;
23   nativeBuildInputs = [ xorg.mkfontscale ];
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   '';
35   meta = with lib; {
36     homepage = "https://tobiasjung.name/profont/";
37     description = "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   };