@@ -3,27 +3,37 @@
33let
44 pname = "victor-mono";
55 version = "1.2.1";
6−in fetchFromGitHub {
6+in fetchFromGitHub rec {
77 name = "${pname}-${version}";
88
99 owner = "rubjo";
1010 repo = pname;
1111 rev = "v${version}";
1212
13+ # Upstream prefers we download from the website,
14+ # but we really insist on a more versioned resource.
15+ # Happily, tagged releases on github contain the same
16+ # file `VictorMonoAll.zip` as from the website,
17+ # so we extract it from the tagged release.
18+ # Both methods produce the same file, but this way
19+ # we can safely reason about what version it is.
1320 postFetch = ''
14− tar xf $downloadedFile --strip=1
15− unzip public/VictorMonoAll.zip TTF/\*
16− mkdir -p $out/share/fonts/truetype/${pname}
17− cp TTF/*.ttf $out/share/fonts/truetype/${pname}
21+ tar xvf $downloadedFile --strip-components=2 ${name}/public/VictorMonoAll.zip
22+
23+ mkdir -p $out/share/fonts/{true,open}type/${pname}
24+
25+ unzip -j VictorMonoAll.zip \*.ttf -d $out/share/fonts/truetype/${pname}
26+ unzip -j VictorMonoAll.zip \*.otf -d $out/share/fonts/opentype/${pname}
1827 '';
1928
20− sha256 = "0gisjcywmn3kjgwfmzcv8ibxqd126s93id2w0zjly0c7m3ckamh8";
29+ sha256 = "0347n3kdyrbg42rxcgnyghi21qz5iz6w30v7ms2vjal7pfm6h2vn";
2130
2231 meta = with lib; {
23− homepage = https://rubjo.github.io/victor-mono;
24− description = "A free programming font with cursive italics and ligatures";
32+ description = "Free programming font with cursive italics and ligatures";
33+ homepage = "https://rubjo.github.io/victor-mono";
2534 license = with licenses; [ mit ];
26− maintainers = with maintainers; [ jpotier ];
35+ maintainers = with maintainers; [ jpotier dtzWill ];
2736 platforms = platforms.all;
2837 };
2938}
39+