summary refs log tree commit diff
path: root/pkgs/data/fonts/tex-gyre-math/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/data/fonts/tex-gyre-math/default.nix')
-rw-r--r--pkgs/data/fonts/tex-gyre-math/default.nix24
1 files changed, 11 insertions, 13 deletions
diff --git a/pkgs/data/fonts/tex-gyre-math/default.nix b/pkgs/data/fonts/tex-gyre-math/default.nix
index 3f9726ee094..8e1d2743174 100644
--- a/pkgs/data/fonts/tex-gyre-math/default.nix
+++ b/pkgs/data/fonts/tex-gyre-math/default.nix
@@ -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;