@@ -0,0 +1,55 @@
1+{ stdenv, fetchurl, mkfontscale }:
2+
3+let
4+ version = "1.5.1";
5+ releaseUrl =
6+ "https://github.com/slavfox/Cozette/releases/download/v.${version}";
7+in stdenv.mkDerivation rec {
8+ pname = "Cozette";
9+ inherit version;
10+
11+ srcs = map fetchurl [
12+ {
13+ url = "${releaseUrl}/cozette.otb";
14+ sha256 = "05k45n7jar11gnng2awpmc7zk9jdlzd6wz87xx49cp75jm4z9xm8";
15+ }
16+ {
17+ url = "${releaseUrl}/CozetteVector.otf";
18+ sha256 = "1sqhnjpizn1wi26lc7z2zml7yr7zkcpa72mh1drvd74rlcs1ip30";
19+ }
20+ {
21+ url = "${releaseUrl}/CozetteVector.ttf";
22+ sha256 = "1q4ml8shv9lmyc6bwhffwvbvl92s73j7xkb0rkqvci4f0zbz7mcy";
23+ }
24+ ];
25+
26+ nativeBuildInputs = [ mkfontscale ];
27+
28+ sourceRoot = "./";
29+
30+ unpackCmd = ''
31+ otName=$(stripHash "$curSrc")
32+ cp $curSrc ./$otName
33+ '';
34+
35+ installPhase = ''
36+
37+ install -D -m 644 *.otf -t "$out/share/fonts/opentype"
38+ install -D -m 644 *.ttf -t "$out/share/fonts/truetype"
39+ install -D -m 644 *.otb -t "$out/share/fonts/misc"
40+
41+ mkfontdir "$out/share/fonts/misc"
42+ mkfontscale "$out/share/fonts/truetype"
43+ mkfontscale "$out/share/fonts/opentype"
44+ '';
45+
46+ outputs = [ "out" ];
47+
48+ meta = with stdenv.lib; {
49+ description = "A bitmap programming font optimized for coziness.";
50+ homepage = "https://github.com/slavfox/cozette";
51+ license = licenses.mit;
52+ platforms = platforms.all;
53+ maintainers = with maintainers; [ brettlyons ];
54+ };
55+}