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:
Robert Helgesson 2015-06-12 00:17:53 +02:00
parent b507c20ba9
commit d7f36310d0
8 changed files with 181 additions and 341 deletions

View File

@ -1,59 +1,31 @@
x@{builderDefsPackage { stdenv, fetchzip }:
, unzip
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "andagii-${version}";
sourceInfo = rec { version = "1.0.2";
url="http://www.i18nguy.com/unicode/andagii.zip";
name="andagii"; src = fetchzip {
version="1.0.2"; url = http://www.i18nguy.com/unicode/andagii.zip;
hash="0cknb8vin15akz4ahpyayrpqyaygp9dgrx6qw7zs7d6iv9v59ds1"; sha256 = "0a0c43y1fd5ksj50axhng7p00kgga0i15p136g68p35wj7kh5g2k";
}; stripRoot = false;
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
curlOpts = "--user-agent 'Mozilla/5.0'"; curlOpts = "--user-agent 'Mozilla/5.0'";
sha256 = sourceInfo.hash;
}; };
name = "${sourceInfo.name}-${sourceInfo.version}"; phases = [ "unpackPhase" "installPhase" ];
inherit buildInputs;
/* doConfigure should be removed if not needed */ installPhase = ''
phaseNames = ["doUnpack" "doInstall"]; mkdir -p $out/share/fonts/truetype
cp -v ANDAGII_.TTF $out/share/fonts/truetype/andagii.ttf
'';
doUnpack = a.fullDepEntry '' # There are multiple claims that the font is GPL, so I include the
unzip "${src}" # package; but I cannot find the original source, so use it on your
'' ["addInputs"]; # own risk Debian claims it is GPL - good enough for me.
meta = with stdenv.lib; {
doInstall = a.fullDepEntry ('' homepage = http://www.i18nguy.com/unicode/unicode-font.HTML;
mkdir -p "$out"/share/fonts/ttf/
cp ANDAGII_.TTF "$out"/share/fonts/ttf/andagii.ttf
'') ["defEnsureDir" "minInit"];
meta = {
description = "Unicode Plane 1 Osmanya script font"; description = "Unicode Plane 1 Osmanya script font";
maintainers = with a.lib.maintainers; maintainers = with maintainers; [ raskin rycee ];
[ license = "unknown";
raskin platforms = platforms.all;
];
hydraPlatforms = [];
# There are multiple claims that the font is GPL,
# so I include the package; but I cannot find the
# original source, so use it on your own risk
# Debian claims it is GPL - good enough for me.
}; };
passthru = { }
updateInfo = {
downloadPage = "http://www.i18nguy.com/unicode/unicode-font.html";
};
};
}) x

View File

@ -1,50 +1,36 @@
x@{builderDefsPackage { stdenv, fetchurl, unzip }:
, unzip
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "anonymousPro-${version}";
sourceInfo = rec { version = "1.002";
version = "1.002";
name="anonymousPro"; src = fetchurl {
url="http://www.ms-studio.com/FontSales/AnonymousPro-${version}.zip"; url = "http://www.marksimonson.com/assets/content/fonts/AnonymousPro-${version}.zip";
sha256 = "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6"; sha256 = "1asj6lykvxh46czbal7ymy2k861zlcdqpz8x3s5bbpqwlm3mhrl6";
}; };
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.sha256;
};
name = "${sourceInfo.name}-${sourceInfo.version}"; nativeBuildInputs = [ unzip ];
inherit buildInputs; 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 ('' meta = with stdenv.lib; {
unzip ${src} homepage = http://www.marksimonson.com/fonts/view/anonymous-pro;
cd AnonymousPro*/
'') ["addInputs"];
meta = {
description = "TrueType font set intended for source code"; description = "TrueType font set intended for source code";
maintainers = with a.lib.maintainers; longDescription = ''
[ Anonymous Pro (2009) is a family of four fixed-width fonts
raskin designed with coding in mind. Anonymous Pro features an
]; international, Unicode-based character set, with support for
platforms = with a.lib.platforms; most Western and Central European Latin-based languages, plus
all; Greek and Cyrillic. It is designed by Mark Simonson.
license = with a.lib.licenses; ofl; '';
hydraPlatforms = []; maintainers = with maintainers; [ raskin rycee ];
homepage = "http://www.marksimonson.com/fonts/view/anonymous-pro"; license = licenses.ofl;
downloadPage = "http://www.ms-studio.com/FontSales/anonymouspro.html"; platforms = platforms.all;
inherit (sourceInfo) version;
}; };
}) x }

View File

@ -1,40 +1,28 @@
x@{builderDefsPackage { stdenv, fetchurl }:
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "cm-unicode-${version}";
sourceInfo = rec { version = "0.7.0";
version = "0.7.0";
baseName="cm-unicode"; src = fetchurl {
name="${baseName}-${version}"; url = "mirror://sourceforge/cm-unicode/cm-unicode/${version}/${name}-otf.tar.xz";
url="mirror://sourceforge/${baseName}/${baseName}/${version}/${name}-otf.tar.xz";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = "0a0w9qm9g8qz2xh3lr61bj1ymqslqsvk4w2ybc3v2qa89nz7x2jl"; sha256 = "0a0w9qm9g8qz2xh3lr61bj1ymqslqsvk4w2ybc3v2qa89nz7x2jl";
}; };
inherit (sourceInfo) name version; phases = [ "unpackPhase" "installPhase" ];
inherit buildInputs;
phaseNames = ["doUnpack" "installFonts"]; installPhase = ''
mkdir -p $out/share/fonts/opentype
mkdir -p $out/share/doc/${name}
cp -v *.otf $out/share/fonts/opentype/
cp -v README FontLog.txt $out/share/doc/${name}
'';
meta = { meta = with stdenv.lib; {
maintainers = with a.lib.maintainers; homepage = http://canopus.iacp.dvo.ru/~panov/cm-unicode/;
[ description = "Computer Modern Unicode fonts";
raskin maintainers = with maintainers; [ raskin rycee ];
]; license = licenses.ofl;
platforms = with a.lib.platforms; platforms = platforms.all;
all;
downloadPage = "http://sourceforge.net/projects/cm-unicode/files/cm-unicode/";
inherit version;
}; };
}) x }

View File

@ -1,50 +1,28 @@
x@{builderDefsPackage { stdenv, fetchzip }:
, unzip
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "eb-garamond-${version}";
sourceInfo = rec { version = "0.016";
version="0.016";
name="EBGaramond"; src = fetchzip {
url="https://bitbucket.org/georgd/eb-garamond/downloads/${name}-${version}.zip"; url = "https://bitbucket.org/georgd/eb-garamond/downloads/EBGaramond-${version}.zip";
hash="0y630khn5zh70al3mm84fs767ac94ffyz1w70zzhrhambx07pdx0"; sha256 = "0j40bg1di39q7zis64il67xchldyznrl8wij9il10c4wr8nl4r9z";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
}; };
name = "eb-garamond-${sourceInfo.version}"; phases = [ "unpackPhase" "installPhase" ];
inherit buildInputs;
phaseNames = ["doUnpack" "installFonts"]; installPhase = ''
mkdir -p $out/share/fonts/opentype
mkdir -p $out/share/doc/${name}
cp -v "otf/"*.otf $out/share/fonts/opentype/
cp -v Changes README.markdown README.xelualatex $out/share/doc/${name}
'';
# This will clean up if/when 8263996 lands. meta = with stdenv.lib; {
doUnpack = a.fullDepEntry (''
unzip ${src}
cd ${sourceInfo.name}*
mv {ttf,otf}/* .
'') ["addInputs"];
meta = with a.lib; {
description = "Digitization of the Garamond shown on the Egenolff-Berner specimen";
maintainers = with maintainers; [ relrod ];
platforms = platforms.all;
license = licenses.ofl;
homepage = http://www.georgduffner.at/ebgaramond/; homepage = http://www.georgduffner.at/ebgaramond/;
description = "Digitization of the Garamond shown on the Egenolff-Berner specimen";
maintainers = with maintainers; [ relrod rycee ];
license = licenses.ofl;
platforms = platforms.all;
}; };
passthru = { }
updateInfo = {
downloadPage = "https://github.com/georgd/EB-Garamond/releases";
};
};
}) x

View File

@ -1,46 +1,29 @@
x@{builderDefsPackage { stdenv, fetchzip }:
, unzip
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "gentium-${version}";
sourceInfo = rec { version = "1.504";
version="1.504";
baseName="GentiumPlus"; src = fetchzip {
name="${baseName}-${version}"; name = "${name}.zip";
url="http://scripts.sil.org/cms/scripts/render_download.php?&format=file&media_id=${name}.zip&filename=${name}"; url = "http://scripts.sil.org/cms/scripts/render_download.php?format=file&media_id=GentiumPlus-${version}.zip&filename=${name}.zip";
hash="04kslaqbscpfrc6igkifcv1nkrclrm35hqpapjhw9102wpq12fpr"; sha256 = "1xdx80dfal0b8rkrp1janybx2hki7algnvkx4hyghgikpjcjkdh7";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
name = "${sourceInfo.name}.zip";
}; };
inherit (sourceInfo) name version; phases = [ "unpackPhase" "installPhase" ];
inherit buildInputs;
phaseNames = ["addInputs" "doUnpack" "installFonts"]; installPhase = ''
mkdir -p $out/share/fonts/truetype
mkdir -p $out/share/doc/${name}
cp -v *.ttf $out/share/fonts/truetype/
cp -v FONTLOG.txt GENTIUM-FAQ.txt README.txt $out/share/doc/${name}
'';
meta = { meta = with stdenv.lib; {
maintainers = with a.lib.maintainers; homepage = "http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=Gentium";
[ description = "A high-quality typeface family for Latin, Cyrillic, and Greek";
raskin maintainers = with maintainers; [ raskin rycee ];
]; license = licenses.ofl;
platforms = with a.lib.platforms; platforms = platforms.all;
all;
}; };
passthru = { }
updateInfo = {
downloadPage = "http://scripts.sil.org/cms/scripts/page.php?item_id=Gentium_download";
};
};
}) x

View File

@ -1,51 +1,26 @@
x@{builderDefsPackage { stdenv, fetchurl }:
, fontforge
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "inconsolata-${version}";
sourceInfo = rec { version = "1.010";
name="inconsolata";
url="http://www.levien.com/type/myfonts/Inconsolata.sfd"; src = fetchurl {
hash="1cd29c8396adb18bfeddb1abf5bdb98b677649bb9b09f126d1335b123a4cfddb"; url = "http://www.levien.com/type/myfonts/Inconsolata.otf";
}; sha256 = "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m";
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
}; };
inherit (sourceInfo) name; phases = [ "installPhase" ];
inherit buildInputs;
/* doConfigure should be removed if not needed */ installPhase = ''
phaseNames = ["copySrc" "generateFontsFromSFD" "installFonts"]; mkdir -p $out/share/fonts/opentype
cp -v $src $out/share/fonts/opentype/inconsolata.otf
copySrc = a.fullDepEntry ('' '';
cp ${src} inconsolata.sfd
'') ["minInit"];
generateFontsFromSFD = a.generateFontsFromSFD // {deps=["addInputs"];}; meta = with stdenv.lib; {
homepage = http://www.levien.com/type/myfonts/inconsolata.html;
meta = {
description = "A monospace font for both screen and print"; description = "A monospace font for both screen and print";
maintainers = with a.lib.maintainers; maintainers = with maintainers; [ raskin rycee ];
[ license = licenses.ofl;
raskin platforms = platforms.all;
];
platforms = with a.lib.platforms;
all;
}; };
passthru = { }
updateInfo = {
downloadPage = "http://www.levien.com/type/myfonts/inconsolata.html";
};
};
}) x

View File

@ -1,50 +1,29 @@
x@{builderDefsPackage { stdenv, fetchzip }:
, unzip
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "oldstandard-${version}";
sourceInfo = rec { version = "2.2";
version="2.2";
baseName="oldstandard"; src = fetchzip {
name="${baseName}-${version}"; stripRoot = false;
url="http://www.thessalonica.org.ru/downloads/${name}.otf.zip"; url = "https://github.com/akryukov/oldstand/releases/download/v${version}/${name}.otf.zip";
hash="0xhbksrh9mv1cs6dl2mc8l6sypialy9wirkjr54nf7s9bcynv1h6"; sha256 = "1hl78jw5szdjq9dhbcv2ln75wpp2lzcxrnfc36z35v5wk4l7jc3h";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
}; };
inherit (sourceInfo) name version; phases = [ "unpackPhase" "installPhase" ];
inherit buildInputs;
phaseNames = ["doUnpack" "installFonts"]; installPhase = ''
mkdir -p $out/share/fonts/opentype
mkdir -p $out/share/doc/${name}
cp -v *.otf $out/share/fonts/opentype/
cp -v FONTLOG.txt $out/share/doc/${name}
'';
doUnpack = a.fullDepEntry '' meta = with stdenv.lib; {
unzip ${src} homepage = https://github.com/akryukov/oldstand;
'' ["addInputs"]; description = "An attempt to revive a specific type of Modern style of serif typefaces";
maintainers = with maintainers; [ raskin rycee ];
meta = { license = licenses.ofl;
description = "An old-style font"; platforms = platforms.all;
maintainers = with a.lib.maintainers;
[
raskin
];
platforms = with a.lib.platforms;
all;
}; };
passthru = { }
updateInfo = {
downloadPage = "http://www.thessalonica.org.ru/ru/fonts-download.html";
};
};
}) x

View File

@ -1,50 +1,29 @@
x@{builderDefsPackage { stdenv, fetchzip }:
, unzip
, ...}:
builderDefsPackage
(a :
let
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
[];
buildInputs = map (n: builtins.getAttr n x) stdenv.mkDerivation rec {
(builtins.attrNames (builtins.removeAttrs x helperArgNames)); name = "theano-${version}";
sourceInfo = rec { version = "2.0";
version="2.0";
baseName="theano"; src = fetchzip {
name="${baseName}-${version}"; stripRoot = false;
url="http://www.thessalonica.org.ru/downloads/${name}.otf.zip"; url = "https://github.com/akryukov/theano/releases/download/v${version}/theano-${version}.otf.zip";
hash="1xiykqbbiawvfk33639awmgdn25b8s2k7vpwncl17bzlk887b4z6"; sha256 = "1z3c63rcp4vfjyfv8xwc3br10ydwjyac3ipbl09y01s7qhfz02gp";
};
in
rec {
src = a.fetchurl {
url = sourceInfo.url;
sha256 = sourceInfo.hash;
}; };
inherit (sourceInfo) name version; phases = [ "unpackPhase" "installPhase" ];
inherit buildInputs;
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 '' meta = with stdenv.lib; {
unzip ${src} homepage = https://github.com/akryukov/theano;
'' ["addInputs"]; description = "An old-style font designed from historic samples";
maintainers = with maintainers; [ raskin rycee ];
meta = { license = licenses.ofl;
description = "An old-style font"; platforms = platforms.all;
maintainers = with a.lib.maintainers;
[
raskin
];
platforms = with a.lib.platforms;
all;
}; };
passthru = { }
updateInfo = {
downloadPage = "http://www.thessalonica.org.ru/ru/fonts-download.html";
};
};
}) x