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.
This commit is contained in:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user