summary refs log tree commit diff
path: root/pkgs/data/fonts/theano/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/data/fonts/theano/default.nix')
-rw-r--r--pkgs/data/fonts/theano/default.nix20
1 files changed, 11 insertions, 9 deletions
diff --git a/pkgs/data/fonts/theano/default.nix b/pkgs/data/fonts/theano/default.nix
index 360d32f3e62..69107f4a8e5 100644
--- a/pkgs/data/fonts/theano/default.nix
+++ b/pkgs/data/fonts/theano/default.nix
@@ -1,19 +1,14 @@
+# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
 { lib, fetchzip }:
 
 let
   version = "2.0";
-in fetchzip rec {
   name = "theano-${version}";
+in (fetchzip rec {
+  inherit name;
 
   url = "https://github.com/akryukov/theano/releases/download/v${version}/theano-${version}.otf.zip";
 
-  postFetch = ''
-    mkdir -p $out/share/fonts/opentype
-    mkdir -p $out/share/doc/${name}
-    unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
-    unzip -j $downloadedFile \*.txt -d "$out/share/doc/${name}"
-  '';
-
   sha256 = "1my1symb7k80ys33iphsxvmf6432wx6vjdnxhzhkgrang1rhx1h8";
 
   meta = with lib; {
@@ -23,4 +18,11 @@ in fetchzip rec {
     license = licenses.ofl;
     platforms = platforms.all;
   };
-}
+}).overrideAttrs (_: {
+  postFetch = ''
+    mkdir -p $out/share/fonts/opentype
+    mkdir -p $out/share/doc/${name}
+    unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
+    unzip -j $downloadedFile \*.txt -d "$out/share/doc/${name}"
+  '';
+})