about summary refs log tree commit diff
path: root/pkgs/data/fonts/anonymous-pro
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2015-06-12 00:17:53 +0200
committerRobert Helgesson <robert@rycee.net>2015-06-12 19:43:18 +0200
commitd7f36310d03a418ea43278b76de559c6fbfa2a8c (patch)
treebf56b01a4965b5a5f2d7dbc8bda39b767c0448e9 /pkgs/data/fonts/anonymous-pro
parentb507c20ba959acee34e569c2802f193719f6d6cb (diff)
Remove use of builderDefsPackage in font packages.
With this change they now use `stdenv.mkDerivation` instead. Also some
minor cleanups such as URL fixes, adding version numbers, adding
descriptions, etc.
Diffstat (limited to 'pkgs/data/fonts/anonymous-pro')
-rw-r--r--pkgs/data/fonts/anonymous-pro/default.nix70
1 files changed, 28 insertions, 42 deletions
diff --git a/pkgs/data/fonts/anonymous-pro/default.nix b/pkgs/data/fonts/anonymous-pro/default.nix
index 5b51ee36c5c70..da34a2f43aa6f 100644
--- a/pkgs/data/fonts/anonymous-pro/default.nix
+++ b/pkgs/data/fonts/anonymous-pro/default.nix
@@ -1,50 +1,36 @@
-x@{builderDefsPackage
-  , unzip
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    [];
+{ stdenv, fetchurl, unzip }:
 
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    version = "1.002";
-    name="anonymousPro";
-    url="http://www.ms-studio.com/FontSales/AnonymousPro-${version}.zip";
+stdenv.mkDerivation rec {
+  name = "anonymousPro-${version}";
+  version = "1.002";
+
+  src = fetchurl {
+    url = "http://www.marksimonson.com/assets/content/fonts/AnonymousPro-${version}.zip";
     sha256 = "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6";
   };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.sha256;
-  };
 
-  name = "${sourceInfo.name}-${sourceInfo.version}";
-  inherit buildInputs;
+  nativeBuildInputs = [ unzip ];
+  phases = [ "unpackPhase" "installPhase" ];
 
-  phaseNames = ["doUnpack" "installFonts"];
+  installPhase = ''
+    mkdir -p $out/share/fonts/truetype
+    mkdir -p $out/share/doc/${name}
+    find . -name "*.ttf" -exec cp -v {} $out/share/fonts/truetype \;
+    find . -name "*.txt" -exec cp -v {} $out/share/doc/${name} \;
+  '';
 
-  doUnpack = a.fullDepEntry (''
-    unzip ${src}
-    cd AnonymousPro*/
-  '') ["addInputs"];
-      
-  meta = {
+  meta = with stdenv.lib; {
+    homepage = http://www.marksimonson.com/fonts/view/anonymous-pro;
     description = "TrueType font set intended for source code";
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      all;
-    license = with a.lib.licenses; ofl;
-    hydraPlatforms = [];
-    homepage = "http://www.marksimonson.com/fonts/view/anonymous-pro";
-    downloadPage = "http://www.ms-studio.com/FontSales/anonymouspro.html";
-    inherit (sourceInfo) version;
+    longDescription = ''
+      Anonymous Pro (2009) is a family of four fixed-width fonts
+      designed with coding in mind. Anonymous Pro features an
+      international, Unicode-based character set, with support for
+      most Western and Central European Latin-based languages, plus
+      Greek and Cyrillic. It is designed by Mark Simonson.
+    '';
+    maintainers = with maintainers; [ raskin rycee ];
+    license = licenses.ofl;
+    platforms = platforms.all;
   };
-}) x
-
+}