source-code-pro: new source

This commit is contained in:
Thomas Tuegel 2015-04-29 17:44:48 -05:00
parent 1fe28a1132
commit f1b1e556c4

View File

@ -1,42 +1,26 @@
x@{builderDefsPackage { stdenv, fetchurl }:
, unzip
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "source-code-pro-${version}";
sourceInfo = rec { version = "1.017";
version="1.017";
name="SourceCodePro"; src = fetchurl {
url="mirror://sourceforge/sourcecodepro.adobe/${name}_FontsOnly-${version}.zip"; url="https://github.com/adobe-fonts/source-code-pro/archive/${version}R.tar.gz";
hash="07xjfxin883a3g3admdddxxqyzigihbsnmik0zpjii09cdlb8dl1"; sha256="03q4a0f142c6zlngv6kjaik52y0yzwq5z5qj3j0fvvcbfy9sanjr";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
}; };
name = "source-code-pro-${sourceInfo.version}"; phases = "unpackPhase installPhase";
inherit buildInputs;
phaseNames = ["doUnpack" "installFonts"]; installPhase = ''
mkdir -p $out/share/fonts/opentype
doUnpack = a.fullDepEntry ('' find . -name "*.otf" -exec cp {} $out/share/fonts/opentype \;
unzip ${src} '';
cd ${sourceInfo.name}*/OTF/
'') ["addInputs"];
meta = { meta = {
description = "A set of monospaced OpenType fonts designed for coding environments"; description = "A set of monospaced OpenType fonts designed for coding environments";
maintainers = with a.lib.maintainers; [ relrod ]; maintainers = with stdenv.lib.maintainers; [ relrod ];
platforms = with a.lib.platforms; all; platforms = with stdenv.lib.platforms; all;
homepage = "http://blog.typekit.com/2012/09/24/source-code-pro/"; homepage = "http://blog.typekit.com/2012/09/24/source-code-pro/";
license = a.lib.licenses.ofl; license = stdenv.lib.licenses.ofl;
}; };
}) x }