@@ -1,51 +1,28 @@
1−{ stdenv, fetchurl }:
1+{ stdenv, fetchFromGitHub }:
22
3−let
4− # last commit on the directory containing the fonts in the upstream repository
5− commit = "883939708704a19a295e0652036369d22469e8dc";
6−in
73stdenv.mkDerivation {
84 pname = "roboto-slab";
9− version = "2016-01-11";
5+ version = "2.000";
106
11− srcs = [
12− (fetchurl {
13− url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotoslab/RobotoSlab-Regular.ttf";
14− sha256 = "04180b5zk2nzll1rrgx8f1i1za66pk6pbrp0iww2xypjqra5zahk";
15− })
16− (fetchurl {
17− url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotoslab/RobotoSlab-Bold.ttf";
18− sha256 = "0ayl2hf5j33vixxfa7051hzjjxnx8zhag3rr0mmmnxpsn7md44ms";
19− })
20− (fetchurl {
21− url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotoslab/RobotoSlab-Light.ttf";
22− sha256 = "09riqgj9ixqjdb3mkzbs799cgmnp3ja3d6izlqkhpkfm52sgafqm";
23− })
24− (fetchurl {
25− url = "https://raw.githubusercontent.com/google/fonts/${commit}/apache/robotoslab/RobotoSlab-Thin.ttf";
26− sha256 = "1hd0m7lxhr261a4s2nb572ari6v53w2yd8yjr9i534iqfl4jcbsf";
27− })
28− ];
29−
30− sourceRoot = "./";
31−
32− unpackCmd = ''
33− ttfName=$(basename $(stripHash $curSrc))
34− cp $curSrc ./$ttfName
35− '';
7+ src = fetchFromGitHub {
8+ owner = "googlefonts";
9+ repo = "robotoslab";
10+ rev = "baeeba45e0c3ccdcfb6a70dc564785941aafef5d";
11+ sha256 = "1v6z0a2xgwgf9dyj62sriy8ckwpbwlxkki6gfax1f4h4livvzpdn";
12+ };
3613
3714 installPhase = ''
3815 mkdir -p $out/share/fonts/truetype
39− cp -a *.ttf $out/share/fonts/truetype/
16+ cp -a fonts/static/*.ttf $out/share/fonts/truetype/
4017 '';
4118
4219 outputHashAlgo = "sha256";
4320 outputHashMode = "recursive";
44− outputHash = "0imhvisjzi0rvn32hn04kngca4szx0j39h4c4zs7ryb4wdca76q9";
21+ outputHash = "0g663npi5lkvwcqafd4cjrm90ph0nv1lig7d19xzfymnj47qpj8x";
4522
46− meta = {
47− homepage = https://www.google.com/fonts/specimen/Roboto+Slab;
48− description = "Google Roboto Slab fonts";
23+ meta = with stdenv.lib; {
24+ homepage = "https://www.google.com/fonts/specimen/Roboto+Slab";
25+ description = "Roboto Slab Typeface by Google";
4926 longDescription = ''
5027 Roboto has a dual nature. It has a mechanical skeleton and the forms
5128 are largely geometric. At the same time, the font features friendly
@@ -57,8 +34,8 @@ stdenv.mkDerivation {
5734 This is the Roboto Slab family, which can be used alongside the normal
5835 Roboto family and the Roboto Condensed family.
5936 '';
60− license = stdenv.lib.licenses.asl20;
61− maintainers = [ stdenv.lib.maintainers.romildo ];
62− platforms = stdenv.lib.platforms.all;
37+ license = licenses.asl20;
38+ platforms = platforms.all;
39+ maintainers = [ maintainers.romildo ];
6340 };
6441}