diff options
Diffstat (limited to 'pkgs/data/fonts/theano/default.nix')
-rw-r--r-- | pkgs/data/fonts/theano/default.nix | 67 |
1 files changed, 23 insertions, 44 deletions
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 - +} |