about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/fonts/spleen/default.nix
blob: 0c114b176abd5cd31fd92dc546e41ede194e2720 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ lib, stdenvNoCC, fetchurl, xorg }:

stdenvNoCC.mkDerivation rec {
  pname = "spleen";
  version = "2.0.1";

  src = fetchurl {
    url = "https://github.com/fcambus/spleen/releases/download/${version}/spleen-${version}.tar.gz";
    hash = "sha256-N9kJrWaQN9eeNoOVJu9UN2+jcEbHqRWxV+X0DXNJLuA=";
  };

  nativeBuildInputs = [ xorg.mkfontscale ];

  dontBuild = true;

  installPhase = ''
    runHook preInstall

    d="$out/share/fonts/misc"
    install -D -m 644 *.{pcf,bdf,otf} -t "$d"
    install -D -m 644 *.psfu -t "$out/share/consolefonts"
    install -m644 fonts.alias-spleen $d/fonts.alias

    # create fonts.dir so NixOS xorg module adds to fp
    mkfontdir "$d"

    runHook postInstall
  '';

  meta = with lib; {
    description = "Monospaced bitmap fonts";
    homepage = "https://www.cambus.net/spleen-monospaced-bitmap-fonts";
    license = licenses.bsd2;
    maintainers = with maintainers; [ dtzWill ];
  };
}