git.iko.soy/typeable/nixpkgs
on master help sign in
league-of-movable-type: 2014-12 -> 2016-10-15
fc19902Profpatsch
pkgs/data/fonts/league-of-moveable-type/default.nix+15−50
@@ -1,57 +1,23 @@
1−{stdenv, fetchurl, unzip}:
1+{stdenv, fetchurl, unzip, raleway}:
2
2
3−stdenv.mkDerivation rec {
3+let
4− baseName = "league-of-moveable-type";
5− version = "2014-12";
6− name="${baseName}-${version}";
7−
8− srcs = [(fetchurl {
9− url = "https://www.theleagueofmoveabletype.com/league-gothic/download";
10− sha256 = "0nbwsbwhs375kbis3lpk98dw05mnh455vghjg1cq0j2fsj1zb99b";
11− name = "league-gothic.zip";
12− })
13−
14− (fetchurl {
15− url = "https://www.theleagueofmoveabletype.com/fanwood/download";
16− sha256 = "1023da7hik8ci8s7rcy6lh4h9p6igx1kz9y1a2cv6sizbp819w8g";
17− name = "fanwood.zip";
18− })
19−
20− (fetchurl {
21− url = "https://www.theleagueofmoveabletype.com/linden-hill/download";
22− sha256 = "0rm92rz9kki91l5wcn149mdpwq1mfql4dv6d159hv534qmg3z3ks";
23− name = "linden-hill.zip";
24− })
25−
26− (fetchurl {
27− url = "https://www.theleagueofmoveabletype.com/raleway/download";
28− sha256 = "0f6anym0adq0ankqbdqx4lyzbysx824zqdj1x60gafyisjx48y87";
29− name = "raleway.zip";
30− })
31
4
32− (fetchurl {
5+ # TO UPDATE:
33− url = "https://www.theleagueofmoveabletype.com/prociono/download";
6+ # ./update.sh > ./fonts.nix
34− sha256 = "11hamjry5lx3cykzpjq7kwlp6h9cjqy470fmn9f2pi954b46xkdy";
7+ # we use the extended version of raleway (same license).
35− name = "prociono.zip";
8+ fonts = [raleway]
36− })
9+ ++ map fetchurl (builtins.filter (f: f.name != "raleway.zip") (import ./fonts.nix));
37−
38− (fetchurl {
39− url = "https://www.theleagueofmoveabletype.com/goudy-bookletter-1911/download";
40− sha256 = "01qganq5n7rgqw546lf45kj8j7ymfjr00i2bwp3qw7ibifg9pn4n";
41− name = "goudy-bookletter-1911.zip";
42− })
43−
44− (fetchurl {
45− url = "https://www.theleagueofmoveabletype.com/sorts-mill-goudy/download";
46− sha256 = "11aywj5lzapk04k2yzi1g96acbbm48x902ka0v9cfwwqpn6js9ra";
47− name = "sorts-mill-goudy.zip";
48− })
49
10
11+in
12+stdenv.mkDerivation rec {
50
13
51−];
14+ baseName = "league-of-moveable-type";
15+ version = "2016-10-15";
16+ name="${baseName}-${version}";
52
17
53− buildInputs = [unzip];
18+ srcs = fonts;
54
19
20+ buildInputs = [ unzip ];
55 sourceRoot = ".";
21 sourceRoot = ".";
56
22
57 installPhase = ''
23 installPhase = ''
@@ -59,7 +25,6 @@ stdenv.mkDerivation rec {
59 cp */*.otf $out/share/fonts/truetype
25 cp */*.otf $out/share/fonts/truetype
60 '';
26 '';
61
27
62−
63 meta = {
28 meta = {
64 description = "Font Collection by The League of Moveable Type";
29 description = "Font Collection by The League of Moveable Type";
65
30
@@ -74,6 +39,6 @@ stdenv.mkDerivation rec {
74 license = stdenv.lib.licenses.ofl;
39 license = stdenv.lib.licenses.ofl;
75
40
76 platforms = stdenv.lib.platforms.all;
41 platforms = stdenv.lib.platforms.all;
77− maintainers = with stdenv.lib.maintainers; [ bergey ];
42+ maintainers = with stdenv.lib.maintainers; [ bergey profpatsch ];
78 };
43 };
79}
44}
pkgs/data/fonts/league-of-moveable-type/fonts.nixnew file+82
@@ -0,0 +1,82 @@
1+[
2+ {
3+ url = "https://www.theleagueofmoveabletype.com/league-spartan/download";
4+ sha256 = "1z9pff8xm58njs7whaxb3sq4vbdkxv7llwgm9nqhwshmgr52jrm1";
5+ name = "league-spartan.zip";
6+ }
7+ {
8+ url = "https://www.theleagueofmoveabletype.com/junction/download";
9+ sha256 = "1qbhfha012ma26n43lm1fh06i7z47wk50r8qsp09bpxc5yr4ypi7";
10+ name = "junction.zip";
11+ }
12+ {
13+ url = "https://www.theleagueofmoveabletype.com/ostrich-sans/download";
14+ sha256 = "11ydhbgcfhmydcnim64vb035cha14krxxrbf62426dm6bvxkphp3";
15+ name = "ostrich-sans.zip";
16+ }
17+ {
18+ url = "https://www.theleagueofmoveabletype.com/league-gothic/download";
19+ sha256 = "0nbwsbwhs375kbis3lpk98dw05mnh455vghjg1cq0j2fsj1zb99b";
20+ name = "league-gothic.zip";
21+ }
22+ {
23+ url = "https://www.theleagueofmoveabletype.com/blackout/download";
24+ sha256 = "1r7dihnjvy4fgvaj5m4llc9dm4cpdl1l79mhg3as16qvjgazms3p";
25+ name = "blackout.zip";
26+ }
27+ {
28+ url = "https://www.theleagueofmoveabletype.com/knewave/download";
29+ sha256 = "065yiakhm6h6jkmigj4pqm2qi6saph0pwb7g8s9gwkskhkk5iy57";
30+ name = "knewave.zip";
31+ }
32+ {
33+ url = "https://www.theleagueofmoveabletype.com/fanwood/download";
34+ sha256 = "1023da7hik8ci8s7rcy6lh4h9p6igx1kz9y1a2cv6sizbp819w8g";
35+ name = "fanwood.zip";
36+ }
37+ {
38+ url = "https://www.theleagueofmoveabletype.com/linden-hill/download";
39+ sha256 = "0rm92rz9kki91l5wcn149mdpwq1mfql4dv6d159hv534qmg3z3ks";
40+ name = "linden-hill.zip";
41+ }
42+ {
43+ url = "https://www.theleagueofmoveabletype.com/league-script-number-one/download";
44+ sha256 = "056hb02a5vydrq5q0gwzanp2zkrrv1spm8sfc5wzhyfzgwd1vc76";
45+ name = "league-script-number-one.zip";
46+ }
47+ {
48+ url = "https://www.theleagueofmoveabletype.com/raleway/download";
49+ sha256 = "0f6anym0adq0ankqbdqx4lyzbysx824zqdj1x60gafyisjx48y87";
50+ name = "raleway.zip";
51+ }
52+ {
53+ url = "https://www.theleagueofmoveabletype.com/prociono/download";
54+ sha256 = "11hamjry5lx3cykzpjq7kwlp6h9cjqy470fmn9f2pi954b46xkdy";
55+ name = "prociono.zip";
56+ }
57+ {
58+ url = "https://www.theleagueofmoveabletype.com/orbitron/download";
59+ sha256 = "156w4j324d350pvjmzdg2w8inhhdfzrvb86rhlavgd9sxx2fykk4";
60+ name = "orbitron.zip";
61+ }
62+ {
63+ url = "https://www.theleagueofmoveabletype.com/goudy-bookletter-1911/download";
64+ sha256 = "01qganq5n7rgqw546lf45kj8j7ymfjr00i2bwp3qw7ibifg9pn4n";
65+ name = "goudy-bookletter-1911.zip";
66+ }
67+ {
68+ url = "https://www.theleagueofmoveabletype.com/sorts-mill-goudy/download";
69+ sha256 = "11aywj5lzapk04k2yzi1g96acbbm48x902ka0v9cfwwqpn6js9ra";
70+ name = "sorts-mill-goudy.zip";
71+ }
72+ {
73+ url = "https://www.theleagueofmoveabletype.com/chunk/download";
74+ sha256 = "15mbqwz90y1n4vlj2xkc8vd56va6la5qnxhiipvcmkrng5y3931j";
75+ name = "chunk.zip";
76+ }
77+ {
78+ url = "https://www.theleagueofmoveabletype.com/sniglet/download";
79+ sha256 = "1lhpnjm52gyhy9s2kwbsg1rd9iyrqli5q9ngp141igx4p1bgbqkc";
80+ name = "sniglet.zip";
81+ }
82+]
pkgs/data/fonts/league-of-moveable-type/update.shnew file+25
@@ -0,0 +1,25 @@
1+#!/usr/bin/env bash
2+
3+SITE=https://www.theleagueofmoveabletype.com
4+
5+# since there is no nice way to get all the fonts,
6+# this fetches the homepage and extracts their names from the html …
7+fonts=$(curl "$SITE" 2>/dev/null | \
8+ sed -ne 's/<img.*cloudfront.*images\/\(.*\)-[[:digit:]-]\..*$/\1/p')
9+
10+# build an ad-hoc nixexpr list with the files & hashes
11+echo "["
12+for f in $fonts; do
13+ url="$SITE/$f/download"
14+ hash=$(nix-prefetch-url --type sha256 "$url" 2>/dev/null)
15+ cat <<EOF
16+ {
17+ url = "$url";
18+ sha256 = "$hash";
19+ name = "$f.zip";
20+ }
21+EOF
22+done
23+echo "]"
24+
25+