Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchurl,
5 xorg,
6 libfaketime,
7}:
8
9stdenv.mkDerivation rec {
10 pname = "clearlyU";
11 version = "12-1.9";
12
13 src = fetchurl {
14 url = "https://www.math.nmsu.edu/~mleisher/Software/cu/cu${version}.tgz";
15 sha256 = "1xn14jbv3m1khy7ydvad9ydkn7yygdbhjy9wm1v000jzjwr3lv21";
16 };
17
18 nativeBuildInputs = [
19 xorg.fonttosfnt
20 xorg.mkfontscale
21 libfaketime
22 ];
23
24 buildPhase = ''
25 # convert bdf fonts to otb
26 for i in *.bdf; do
27 name=$(basename "$i" .bdf)
28 faketime -f "1970-01-01 00:00:01" fonttosfnt -g 2 -m 2 -v -o "$name.otb" "$i"
29 done
30 '';
31
32 installPhase = ''
33 # install otb and bdf fonts
34 fontDir="$out/share/fonts"
35 install -m 644 -D *.bdf *.otb -t "$fontDir"
36 mkfontdir "$fontDir"
37 '';
38
39 meta = with lib; {
40 description = "Unicode font";
41 license = licenses.mit;
42 maintainers = [ maintainers.raskin ];
43 };
44}