summary refs log tree commit diff
path: root/pkgs/data/fonts/tex-gyre-math
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@mailbox.org>2018-04-03 06:32:02 -0500
committerThomas Tuegel <ttuegel@mailbox.org>2018-04-03 06:32:02 -0500
commit140f2a358407e6f6aac0247c8b05457e1104bf3c (patch)
tree0d7d3c2983056570731889fddc2c712c3ddddae1 /pkgs/data/fonts/tex-gyre-math
parent87c12bda03f73a66c8919419f1fb121affcc5146 (diff)
downloadnixpkgs-140f2a358407e6f6aac0247c8b05457e1104bf3c.tar
nixpkgs-140f2a358407e6f6aac0247c8b05457e1104bf3c.tar.gz
nixpkgs-140f2a358407e6f6aac0247c8b05457e1104bf3c.tar.bz2
nixpkgs-140f2a358407e6f6aac0247c8b05457e1104bf3c.tar.lz
nixpkgs-140f2a358407e6f6aac0247c8b05457e1104bf3c.tar.xz
nixpkgs-140f2a358407e6f6aac0247c8b05457e1104bf3c.tar.zst
nixpkgs-140f2a358407e6f6aac0247c8b05457e1104bf3c.zip
tex-gyre-*-math: Move to `tex-gyre-math` package set
The `tex-gyre-*-math` fonts are moved to the `tex-gyre-math` set for consistency
with `tex-gyre` and to allow them to be easily installed together. Aliases are
created for backwards-compatibility.
Diffstat (limited to 'pkgs/data/fonts/tex-gyre-math')
-rw-r--r--pkgs/data/fonts/tex-gyre-math/default.nix71
1 files changed, 37 insertions, 34 deletions
diff --git a/pkgs/data/fonts/tex-gyre-math/default.nix b/pkgs/data/fonts/tex-gyre-math/default.nix
index e99e0bfb342..3f9726ee094 100644
--- a/pkgs/data/fonts/tex-gyre-math/default.nix
+++ b/pkgs/data/fonts/tex-gyre-math/default.nix
@@ -1,4 +1,4 @@
-{ variant, stdenv, fetchzip }:
+{ stdenv, fetchzip }:
 
 let
   variants = {
@@ -27,40 +27,43 @@ let
       outputHash = "0pa433cgshlypbyrrlp3qq0wg972rngcp37pr8pxdfshgz13q1mm";
     };
   };
-  current = variants."${variant}";
-  dotless_version = builtins.replaceStrings ["."] [""] current.version;
-in stdenv.mkDerivation rec {
-  name = "tex-gyre-${variant}-math-${current.version}";
-  version = "${current.version}";
 
-  src = fetchzip {
-    url = "www.gust.org.pl/projects/e-foundry/tg-math/download/texgyre${variant}-math-${dotless_version}.zip";
-    sha256 = current.sha256;
-  };
+  mkVariant = variant: current:
+    let dotless_version = builtins.replaceStrings ["."] [""] current.version; in
+    stdenv.mkDerivation rec {
+      name = "tex-gyre-${variant}-math-${current.version}";
+      version = "${current.version}";
 
-  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}/
-  '';
+      src = fetchzip {
+        url = "www.gust.org.pl/projects/e-foundry/tg-math/download/texgyre${variant}-math-${dotless_version}.zip";
+        sha256 = current.sha256;
+      };
 
-  outputHashAlgo = "sha256";
-  outputHashMode = "recursive";
-  outputHash = current.outputHash;
+      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}/
+      '';
 
-  meta = with stdenv.lib; {
-    longDescription = ''
-      TeX Gyre ${current.displayName} Math is a math companion for the TeX Gyre
-      ${current.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;
-    # "The TeX Gyre Math fonts are licensed under the GUST Font License (GFL),
-    # which is a free license, legally equivalent to the LaTeX Project Public
-    # License (LPPL), version 1.3c or later." - GUST website
-    license = licenses.lppl13c;
-    maintainers = with maintainers; [ siddharthist ];
-    platforms = platforms.all;
-  };
-}
+      outputHashAlgo = "sha256";
+      outputHashMode = "recursive";
+      outputHash = current.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
+          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;
+        # "The TeX Gyre Math fonts are licensed under the GUST Font License (GFL),
+        # which is a free license, legally equivalent to the LaTeX Project Public
+        # License (LPPL), version 1.3c or later." - GUST website
+        license = licenses.lppl13c;
+        maintainers = with maintainers; [ siddharthist ];
+        platforms = platforms.all;
+      };
+    };
+in
+  stdenv.lib.mapAttrs mkVariant variants