summary refs log tree commit diff
path: root/pkgs/data/fonts/source-code-pro
diff options
context:
space:
mode:
authorRicky Elrod <ricky@elrod.me>2014-05-06 19:45:54 -0400
committerRicky Elrod <ricky@elrod.me>2014-05-06 19:49:15 -0400
commitdf9427c535532e6cc7774c53bf6de9c9feb7008a (patch)
tree775120d9415915ac20a99e5efadabb75946fb137 /pkgs/data/fonts/source-code-pro
parent535de5e45acac5a64e762fd674de946e09493a6a (diff)
downloadnixpkgs-df9427c535532e6cc7774c53bf6de9c9feb7008a.tar
nixpkgs-df9427c535532e6cc7774c53bf6de9c9feb7008a.tar.gz
nixpkgs-df9427c535532e6cc7774c53bf6de9c9feb7008a.tar.bz2
nixpkgs-df9427c535532e6cc7774c53bf6de9c9feb7008a.tar.lz
nixpkgs-df9427c535532e6cc7774c53bf6de9c9feb7008a.tar.xz
nixpkgs-df9427c535532e6cc7774c53bf6de9c9feb7008a.tar.zst
nixpkgs-df9427c535532e6cc7774c53bf6de9c9feb7008a.zip
Source Code Pro font
Diffstat (limited to 'pkgs/data/fonts/source-code-pro')
-rw-r--r--pkgs/data/fonts/source-code-pro/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/data/fonts/source-code-pro/default.nix b/pkgs/data/fonts/source-code-pro/default.nix
new file mode 100644
index 00000000000..d48fbed696c
--- /dev/null
+++ b/pkgs/data/fonts/source-code-pro/default.nix
@@ -0,0 +1,42 @@
+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="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;
+  };
+
+  name = "${sourceInfo.name}-${sourceInfo.version}";
+  inherit buildInputs;
+
+  phaseNames = ["doUnpack" "installFonts"];
+
+  doUnpack = a.fullDepEntry (''
+    unzip ${src}
+    cd ${sourceInfo.name}*/OTF/
+  '') ["addInputs"];
+
+  meta = {
+    description = "A set of monospaced OpenType fonts designed for coding environments";
+    maintainers = with a.lib.maintainers; [ relrod ];
+    platforms = with a.lib.platforms; all;
+    homepage = "http://blog.typekit.com/2012/09/24/source-code-pro/";
+    license = "OFL";
+  };
+}) x