roboto: make the font derivation fixed-output

- [x] make the font derivation fixed-output (https://github.com/NixOS/nixpkgs/issues/27754)
This commit is contained in:
volth 2017-08-11 04:53:39 +00:00 committed by Franz Pletz
parent 72d3d2a773
commit 1fe7f03544

View File

@ -1,21 +1,19 @@
{ stdenv, fetchurl, unzip }: { stdenv, fetchzip }:
stdenv.mkDerivation rec { let
name = "roboto-${version}";
version = "2.136"; version = "2.136";
in fetchzip rec {
name = "roboto-${version}";
src = fetchurl { url = "https://github.com/google/roboto/releases/download/v${version}/roboto-unhinted.zip";
url = "https://github.com/google/roboto/releases/download/v${version}/roboto-unhinted.zip";
sha256 = "0yx3q5wbbl1qkxfx1fglzy3rvms98jr8fcfj70vvvz3r3lppv201";
};
nativeBuildInputs = [ unzip ]; postFetch = ''
mkdir -p $out/share/fonts
installPhase = '' unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
mkdir -p $out/share/fonts/truetype
cp -a *.ttf $out/share/fonts/truetype/
''; '';
sha256 = "02fanxx2hg0kvxl693rc0fkbrbr2i8b14qmpparkrwmv0j35wnd7";
meta = { meta = {
homepage = https://github.com/google/roboto; homepage = https://github.com/google/roboto;
description = "The Roboto family of fonts"; description = "The Roboto family of fonts";