mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 06:14:26 +03:00
league-of-movable-type: 2014-12 -> 2016-10-15
Restructured, so that updates can be done by executing a shell script. Also uses the extended Raleway fonts, the league itself has only thin variants.
This commit is contained in:
parent
a1d3af2082
commit
fc19902260
@ -1,57 +1,23 @@
|
||||
{stdenv, fetchurl, unzip}:
|
||||
{stdenv, fetchurl, unzip, raleway}:
|
||||
|
||||
let
|
||||
|
||||
# TO UPDATE:
|
||||
# ./update.sh > ./fonts.nix
|
||||
# we use the extended version of raleway (same license).
|
||||
fonts = [raleway]
|
||||
++ map fetchurl (builtins.filter (f: f.name != "raleway.zip") (import ./fonts.nix));
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
baseName = "league-of-moveable-type";
|
||||
version = "2014-12";
|
||||
version = "2016-10-15";
|
||||
name="${baseName}-${version}";
|
||||
|
||||
srcs = [(fetchurl {
|
||||
url = "https://www.theleagueofmoveabletype.com/league-gothic/download";
|
||||
sha256 = "0nbwsbwhs375kbis3lpk98dw05mnh455vghjg1cq0j2fsj1zb99b";
|
||||
name = "league-gothic.zip";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
url = "https://www.theleagueofmoveabletype.com/fanwood/download";
|
||||
sha256 = "1023da7hik8ci8s7rcy6lh4h9p6igx1kz9y1a2cv6sizbp819w8g";
|
||||
name = "fanwood.zip";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
url = "https://www.theleagueofmoveabletype.com/linden-hill/download";
|
||||
sha256 = "0rm92rz9kki91l5wcn149mdpwq1mfql4dv6d159hv534qmg3z3ks";
|
||||
name = "linden-hill.zip";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
url = "https://www.theleagueofmoveabletype.com/raleway/download";
|
||||
sha256 = "0f6anym0adq0ankqbdqx4lyzbysx824zqdj1x60gafyisjx48y87";
|
||||
name = "raleway.zip";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
url = "https://www.theleagueofmoveabletype.com/prociono/download";
|
||||
sha256 = "11hamjry5lx3cykzpjq7kwlp6h9cjqy470fmn9f2pi954b46xkdy";
|
||||
name = "prociono.zip";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
url = "https://www.theleagueofmoveabletype.com/goudy-bookletter-1911/download";
|
||||
sha256 = "01qganq5n7rgqw546lf45kj8j7ymfjr00i2bwp3qw7ibifg9pn4n";
|
||||
name = "goudy-bookletter-1911.zip";
|
||||
})
|
||||
|
||||
(fetchurl {
|
||||
url = "https://www.theleagueofmoveabletype.com/sorts-mill-goudy/download";
|
||||
sha256 = "11aywj5lzapk04k2yzi1g96acbbm48x902ka0v9cfwwqpn6js9ra";
|
||||
name = "sorts-mill-goudy.zip";
|
||||
})
|
||||
|
||||
|
||||
];
|
||||
|
||||
buildInputs = [unzip];
|
||||
srcs = fonts;
|
||||
|
||||
buildInputs = [ unzip ];
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
@ -59,7 +25,6 @@ stdenv.mkDerivation rec {
|
||||
cp */*.otf $out/share/fonts/truetype
|
||||
'';
|
||||
|
||||
|
||||
meta = {
|
||||
description = "Font Collection by The League of Moveable Type";
|
||||
|
||||
@ -74,6 +39,6 @@ stdenv.mkDerivation rec {
|
||||
license = stdenv.lib.licenses.ofl;
|
||||
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
maintainers = with stdenv.lib.maintainers; [ bergey ];
|
||||
maintainers = with stdenv.lib.maintainers; [ bergey profpatsch ];
|
||||
};
|
||||
}
|
||||
|
82
pkgs/data/fonts/league-of-moveable-type/fonts.nix
Normal file
82
pkgs/data/fonts/league-of-moveable-type/fonts.nix
Normal file
@ -0,0 +1,82 @@
|
||||
[
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/league-spartan/download";
|
||||
sha256 = "1z9pff8xm58njs7whaxb3sq4vbdkxv7llwgm9nqhwshmgr52jrm1";
|
||||
name = "league-spartan.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/junction/download";
|
||||
sha256 = "1qbhfha012ma26n43lm1fh06i7z47wk50r8qsp09bpxc5yr4ypi7";
|
||||
name = "junction.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/ostrich-sans/download";
|
||||
sha256 = "11ydhbgcfhmydcnim64vb035cha14krxxrbf62426dm6bvxkphp3";
|
||||
name = "ostrich-sans.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/league-gothic/download";
|
||||
sha256 = "0nbwsbwhs375kbis3lpk98dw05mnh455vghjg1cq0j2fsj1zb99b";
|
||||
name = "league-gothic.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/blackout/download";
|
||||
sha256 = "1r7dihnjvy4fgvaj5m4llc9dm4cpdl1l79mhg3as16qvjgazms3p";
|
||||
name = "blackout.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/knewave/download";
|
||||
sha256 = "065yiakhm6h6jkmigj4pqm2qi6saph0pwb7g8s9gwkskhkk5iy57";
|
||||
name = "knewave.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/fanwood/download";
|
||||
sha256 = "1023da7hik8ci8s7rcy6lh4h9p6igx1kz9y1a2cv6sizbp819w8g";
|
||||
name = "fanwood.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/linden-hill/download";
|
||||
sha256 = "0rm92rz9kki91l5wcn149mdpwq1mfql4dv6d159hv534qmg3z3ks";
|
||||
name = "linden-hill.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/league-script-number-one/download";
|
||||
sha256 = "056hb02a5vydrq5q0gwzanp2zkrrv1spm8sfc5wzhyfzgwd1vc76";
|
||||
name = "league-script-number-one.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/raleway/download";
|
||||
sha256 = "0f6anym0adq0ankqbdqx4lyzbysx824zqdj1x60gafyisjx48y87";
|
||||
name = "raleway.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/prociono/download";
|
||||
sha256 = "11hamjry5lx3cykzpjq7kwlp6h9cjqy470fmn9f2pi954b46xkdy";
|
||||
name = "prociono.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/orbitron/download";
|
||||
sha256 = "156w4j324d350pvjmzdg2w8inhhdfzrvb86rhlavgd9sxx2fykk4";
|
||||
name = "orbitron.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/goudy-bookletter-1911/download";
|
||||
sha256 = "01qganq5n7rgqw546lf45kj8j7ymfjr00i2bwp3qw7ibifg9pn4n";
|
||||
name = "goudy-bookletter-1911.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/sorts-mill-goudy/download";
|
||||
sha256 = "11aywj5lzapk04k2yzi1g96acbbm48x902ka0v9cfwwqpn6js9ra";
|
||||
name = "sorts-mill-goudy.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/chunk/download";
|
||||
sha256 = "15mbqwz90y1n4vlj2xkc8vd56va6la5qnxhiipvcmkrng5y3931j";
|
||||
name = "chunk.zip";
|
||||
}
|
||||
{
|
||||
url = "https://www.theleagueofmoveabletype.com/sniglet/download";
|
||||
sha256 = "1lhpnjm52gyhy9s2kwbsg1rd9iyrqli5q9ngp141igx4p1bgbqkc";
|
||||
name = "sniglet.zip";
|
||||
}
|
||||
]
|
25
pkgs/data/fonts/league-of-moveable-type/update.sh
Normal file
25
pkgs/data/fonts/league-of-moveable-type/update.sh
Normal file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SITE=https://www.theleagueofmoveabletype.com
|
||||
|
||||
# since there is no nice way to get all the fonts,
|
||||
# this fetches the homepage and extracts their names from the html …
|
||||
fonts=$(curl "$SITE" 2>/dev/null | \
|
||||
sed -ne 's/<img.*cloudfront.*images\/\(.*\)-[[:digit:]-]\..*$/\1/p')
|
||||
|
||||
# build an ad-hoc nixexpr list with the files & hashes
|
||||
echo "["
|
||||
for f in $fonts; do
|
||||
url="$SITE/$f/download"
|
||||
hash=$(nix-prefetch-url --type sha256 "$url" 2>/dev/null)
|
||||
cat <<EOF
|
||||
{
|
||||
url = "$url";
|
||||
sha256 = "$hash";
|
||||
name = "$f.zip";
|
||||
}
|
||||
EOF
|
||||
done
|
||||
echo "]"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user