font-awesome: use fetchFromGitHub instead of url

This commit is contained in:
Peter Hoeg 2016-10-02 15:45:01 +08:00
parent 09e4b78b48
commit 8c87ca1327
1 changed files with 13 additions and 11 deletions

View File

@ -1,28 +1,30 @@
{stdenv, fetchurl, unzip}: { stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "font-awesome-4.6.3"; name = "font-awesome-${version}";
version = "4.6.3";
src = fetchurl { src = fetchFromGitHub {
url = "http://fortawesome.github.io/Font-Awesome/assets/${name}.zip"; owner = "FortAwesome";
sha256 = "06d6p3rydy86hg82igra4vqglyx7bii19jj5kdyhva0d2gqv7zfn"; repo = "Font-Awesome";
rev = "v${version}";
sha256 = "135k1xskksqzriad9zzcxa79iprldyp2bnmc22wslak0dvjz74w0";
}; };
buildCommand = '' buildCommand = ''
${unzip}/bin/unzip $src
mkdir -p $out/share/fonts/truetype mkdir -p $out/share/fonts/truetype
cp */fonts/*.ttf $out/share/fonts/truetype cp $src/fonts/*.ttf $out/share/fonts/truetype
''; '';
meta = { meta = with stdenv.lib; {
description = "Font Awesome - TTF font"; description = "Font Awesome - TTF font";
longDescription = '' longDescription = ''
Font Awesome gives you scalable vector icons that can instantly be customized. Font Awesome gives you scalable vector icons that can instantly be customized.
This package includes only the TTF font. For full CSS etc. see the project website. This package includes only the TTF font. For full CSS etc. see the project website.
''; '';
homepage = "http://fortawesome.github.io/Font-Awesome/"; homepage = "http://fortawesome.github.io/Font-Awesome/";
license = stdenv.lib.licenses.ofl; license = licenses.ofl;
platforms = stdenv.lib.platforms.all; platforms = platforms.all;
maintainers = [ stdenv.lib.maintainers.abaldeau ]; maintainers = with maintainers; [ abaldeau ];
}; };
} }