From d7f36310d03a418ea43278b76de559c6fbfa2a8c Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Fri, 12 Jun 2015 00:17:53 +0200 Subject: 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. --- pkgs/data/fonts/theano/default.nix | 67 +++++++++++++------------------------- 1 file changed, 23 insertions(+), 44 deletions(-) (limited to 'pkgs/data/fonts/theano/default.nix') diff --git a/pkgs/data/fonts/theano/default.nix b/pkgs/data/fonts/theano/default.nix index ca560c72a8ec..c385c3d40a92 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 - +} -- cgit 1.4.1