summary refs log tree commit diff
path: root/pkgs/data/fonts/source-code-pro
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-04-29 17:44:48 -0500
committerThomas Tuegel <ttuegel@gmail.com>2015-04-29 17:44:48 -0500
commitf1b1e556c41aa8b5a9f15690005019a32941c999 (patch)
tree7de728d8d2e2cba44389da91873bc554999f5946 /pkgs/data/fonts/source-code-pro
parent1fe28a11327ad7695ee9f023c74bd47894494bcb (diff)
downloadnixpkgs-f1b1e556c41aa8b5a9f15690005019a32941c999.tar
nixpkgs-f1b1e556c41aa8b5a9f15690005019a32941c999.tar.gz
nixpkgs-f1b1e556c41aa8b5a9f15690005019a32941c999.tar.bz2
nixpkgs-f1b1e556c41aa8b5a9f15690005019a32941c999.tar.lz
nixpkgs-f1b1e556c41aa8b5a9f15690005019a32941c999.tar.xz
nixpkgs-f1b1e556c41aa8b5a9f15690005019a32941c999.tar.zst
nixpkgs-f1b1e556c41aa8b5a9f15690005019a32941c999.zip
source-code-pro: new source
Diffstat (limited to 'pkgs/data/fonts/source-code-pro')
-rw-r--r--pkgs/data/fonts/source-code-pro/default.nix50
1 files changed, 17 insertions, 33 deletions
diff --git a/pkgs/data/fonts/source-code-pro/default.nix b/pkgs/data/fonts/source-code-pro/default.nix
index dc5bcb5b9a7..b3761bc0b5b 100644
--- a/pkgs/data/fonts/source-code-pro/default.nix
+++ b/pkgs/data/fonts/source-code-pro/default.nix
@@ -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";
 
-  name = "source-code-pro-${sourceInfo.version}";
-  inherit buildInputs;
+  src = fetchurl {
+    url="https://github.com/adobe-fonts/source-code-pro/archive/${version}R.tar.gz";
+    sha256="03q4a0f142c6zlngv6kjaik52y0yzwq5z5qj3j0fvvcbfy9sanjr";
+  };
 
-  phaseNames = ["doUnpack" "installFonts"];
+  phases = "unpackPhase installPhase";
 
-  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
+}