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