data/fonts: cleanup

* make font derivations fixed-output where applicable
 * fix dead links
 * `stdenv.lib` -> `lib` where `stdenv` is not involved
 * remove `meta.platforms = [ unix ]` and `meta.platforms = [ linux ]` because the restriction has no sense for data packages
This commit is contained in:
volth
2019-05-13 06:03:31 +00:00
parent 1df1834dd1
commit c9eb44eab3
177 changed files with 789 additions and 929 deletions
+11 -13
View File
@@ -28,32 +28,30 @@ let
};
};
mkVariant = variant: current:
let dotless_version = builtins.replaceStrings ["."] [""] current.version; in
mkVariant = variant: {displayName, version, sha256, outputHash}:
let dotless_version = builtins.replaceStrings ["."] [""] version; in
stdenv.mkDerivation rec {
name = "tex-gyre-${variant}-math-${current.version}";
version = "${current.version}";
name = "tex-gyre-${variant}-math-${version}";
inherit version;
src = fetchzip {
url = "www.gust.org.pl/projects/e-foundry/tg-math/download/texgyre${variant}-math-${dotless_version}.zip";
sha256 = current.sha256;
url = "http://www.gust.org.pl/projects/e-foundry/tg-math/download/texgyre${variant}-math-${dotless_version}.zip";
inherit sha256;
};
installPhase = ''
mkdir -p $out/share/fonts/opentype/
mkdir -p $out/share/doc/${name}/
cp -v opentype/*.otf $out/share/fonts/opentype/
cp -v doc/*.txt $out/share/doc/${name}/
install -m444 -Dt $out/share/fonts/opentype opentype/*.otf
install -m444 -Dt $out/share/doc/${name} doc/*.txt
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = current.outputHash;
inherit outputHash;
meta = with stdenv.lib; {
longDescription = ''
TeX Gyre ${current.displayName} Math is a math companion for the TeX Gyre
${current.displayName} family of fonts (see
TeX Gyre ${displayName} Math is a math companion for the TeX Gyre
${displayName} family of fonts (see
http://www.gust.org.pl/projects/e-foundry/tex-gyre/) in the OpenType format.
'';
homepage = http://www.gust.org.pl/projects/e-foundry/tg-math;