Merge pull request #19573 from Profpatsch/league-of-moveable-type

League of moveable type update & raleway
This commit is contained in:
Jörg Thalheim 2016-10-15 11:25:35 +02:00 committed by GitHub
commit f175831407
5 changed files with 167 additions and 50 deletions

View File

@ -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 ];
};
}

View 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";
}
]

View 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 "]"

View File

@ -0,0 +1,43 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "raleway-${version}";
version = "2016-08-30";
src = fetchFromGitHub {
owner = "impallari";
repo = "Raleway";
rev = "fa27f47b087fc093c6ae11cfdeb3999ac602929a";
sha256 = "1i6a14ynm29gqjr7kfk118v69vjpd3g4ylwfvhwa66xax09jkhlr";
};
dontBuild = true;
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp "$src/fonts/OTF v3.000 Fontlab"/*.otf $out/share/fonts/truetype
find -type f -maxdepth 1 -exec cp "{}" $out/ \;
'';
meta = {
description = "Raleway is an elegant sans-serif typeface family";
longDescription = ''
Initially designed by Matt McInerney as a single thin weight, it was
expanded into a 9 weight family by Pablo Impallari and Rodrigo Fuenzalida
in 2012 and iKerned by Igino Marini. In 2013 the Italics where added.
It is a display face and the download features both old style and lining
numerals, standard and discretionary ligatures, a pretty complete set of
diacritics, as well as a stylistic alternate inspired by more geometric
sans-serif typefaces than its neo-grotesque inspired default character
set.
It also has a sister display family, Raleway Dots.
'';
homepage = src.homepage;
license = stdenv.lib.licenses.ofl;
maintainers = with stdenv.lib.maintainers; [ profpatsch ];
};
}

View File

@ -11803,6 +11803,8 @@ in
r5rs = callPackage ../data/documentation/rnrs/r5rs.nix { };
raleway = callPackage ../data/fonts/raleway { };
roboto = callPackage ../data/fonts/roboto { };
roboto-mono = callPackage ../data/fonts/roboto-mono { };