1{ lib, stdenv, fetchFromGitHub, xorg }:
2
3stdenv.mkDerivation rec {
4 pname = "cherry";
5 version = "1.4";
6
7 src = fetchFromGitHub {
8 owner = "turquoise-hexagon";
9 repo = pname;
10 rev = version;
11 sha256 = "13zkxwp6r6kcxv4x459vwscr0n0sik4a3kcz5xnmlpvcdnbxi586";
12 };
13
14 nativeBuildInputs = [ xorg.fonttosfnt xorg.mkfontdir ];
15
16 buildPhase = ''
17 patchShebangs make.sh
18 ./make.sh
19 '';
20
21 installPhase = ''
22 mkdir -p $out/share/fonts/misc
23 cp *.otb $out/share/fonts/misc
24
25 # create fonts.dir so NixOS xorg module adds to fp
26 mkfontdir $out/share/fonts/misc
27 '';
28
29 meta = with lib; {
30 description = "cherry font";
31 homepage = "https://github.com/turquoise-hexagon/cherry";
32 license = licenses.mit;
33 maintainers = [ ];
34 platforms = platforms.all;
35 };
36}
37