Add eb-garamond font (close #2553)

@vcunat added license, changed attribute name according to the [rules],
and trivial refactoring.
[rules]: http://nixos.org/nixpkgs/manual/#idm140333184443184 ("package naming")
This commit is contained in:
Ricky Elrod 2014-05-07 03:56:41 -04:00 committed by Vladimír Čunát
parent dd592d7ef3
commit b56e41aebe
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
x@{builderDefsPackage
, unzip
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x)
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
sourceInfo = rec {
version="0.016";
name="EBGaramond";
url="https://bitbucket.org/georgd/eb-garamond/downloads/${name}-${version}.zip";
hash="0y630khn5zh70al3mm84fs767ac94ffyz1w70zzhrhambx07pdx0";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
};
name = "eb-garamond-${sourceInfo.version}";
inherit buildInputs;
phaseNames = ["doUnpack" "installFonts"];
# This will clean up if/when 8263996 lands.
doUnpack = a.fullDepEntry (''
unzip ${src}
cd ${sourceInfo.name}*
mv {ttf,otf}/* .
'') ["addInputs"];
meta = with a.lib; {
description = "Digitization of the Garamond shown on the Egenolff-Berner specimen";
maintainers = with maintainers; [ relrod ];
platforms = platforms.all;
license = licenses.ofl;
homepage = http://www.georgduffner.at/ebgaramond/;
};
passthru = {
updateInfo = {
downloadPage = "https://github.com/georgd/EB-Garamond/releases";
};
};
}) x

View File

@ -7638,6 +7638,8 @@ let
dosemu_fonts = callPackage ../data/fonts/dosemu-fonts { };
eb-garamond = callPackage ../data/fonts/eb-garamond { };
freefont_ttf = callPackage ../data/fonts/freefont-ttf { };
freepats = callPackage ../data/misc/freepats { };