summary refs log tree commit diff
path: root/pkgs/data/fonts/theano
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/theano
parentb507c20ba959acee34e569c2802f193719f6d6cb (diff)
downloadnixpkgs-d7f36310d03a418ea43278b76de559c6fbfa2a8c.tar
nixpkgs-d7f36310d03a418ea43278b76de559c6fbfa2a8c.tar.gz
nixpkgs-d7f36310d03a418ea43278b76de559c6fbfa2a8c.tar.bz2
nixpkgs-d7f36310d03a418ea43278b76de559c6fbfa2a8c.tar.lz
nixpkgs-d7f36310d03a418ea43278b76de559c6fbfa2a8c.tar.xz
nixpkgs-d7f36310d03a418ea43278b76de559c6fbfa2a8c.tar.zst
nixpkgs-d7f36310d03a418ea43278b76de559c6fbfa2a8c.zip
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/theano')
-rw-r--r--pkgs/data/fonts/theano/default.nix67
1 files changed, 23 insertions, 44 deletions
diff --git a/pkgs/data/fonts/theano/default.nix b/pkgs/data/fonts/theano/default.nix
index ca560c72a8e..c385c3d40a9 100644
--- a/pkgs/data/fonts/theano/default.nix
+++ b/pkgs/data/fonts/theano/default.nix
@@ -1,50 +1,29 @@
-x@{builderDefsPackage
-  , unzip
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    [];
+{ stdenv, fetchzip }:
 
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    version="2.0";
-    baseName="theano";
-    name="${baseName}-${version}";
-    url="http://www.thessalonica.org.ru/downloads/${name}.otf.zip";
-    hash="1xiykqbbiawvfk33639awmgdn25b8s2k7vpwncl17bzlk887b4z6";
-  };
-in
-rec {
-  src = a.fetchurl {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
+stdenv.mkDerivation rec {
+  name = "theano-${version}";
+  version = "2.0";
+
+  src = fetchzip {
+    stripRoot = false;
+    url = "https://github.com/akryukov/theano/releases/download/v${version}/theano-${version}.otf.zip";
+    sha256 = "1z3c63rcp4vfjyfv8xwc3br10ydwjyac3ipbl09y01s7qhfz02gp";
   };
 
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
+  phases = [ "unpackPhase" "installPhase" ];
 
-  phaseNames = ["doUnpack" "installFonts"];
+  installPhase = ''
+    mkdir -p $out/share/fonts/opentype
+    mkdir -p $out/share/doc/${name}
+    find . -name "*.otf" -exec cp -v {} $out/share/fonts/opentype \;
+    find . -name "*.txt" -exec cp -v {} $out/share/doc/${name} \;
+  '';
 
-  doUnpack = a.fullDepEntry ''
-    unzip ${src}
-  '' ["addInputs"];
-      
-  meta = {
-    description = "An old-style font";
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      all;
+  meta = with stdenv.lib; {
+    homepage = https://github.com/akryukov/theano;
+    description = "An old-style font designed from historic samples";
+    maintainers = with maintainers; [ raskin rycee ];
+    license = licenses.ofl;
+    platforms = platforms.all;
   };
-  passthru = {
-    updateInfo = {
-      downloadPage = "http://www.thessalonica.org.ru/ru/fonts-download.html";
-    };
-  };
-}) x
-
+}