summary refs log tree commit diff
path: root/pkgs/data/fonts/marathi-cursive
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-01-18 21:29:32 +0100
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-01-18 21:29:32 +0100
commit1c2523b7498556253d65c4684a11bf421a60ae42 (patch)
tree62cc156d406c2cf2fddf1eef58f0d4c3a253a870 /pkgs/data/fonts/marathi-cursive
parent3fd894b06e9a56d155f9faae82b7407addfecce3 (diff)
downloadnixpkgs-1c2523b7498556253d65c4684a11bf421a60ae42.tar
nixpkgs-1c2523b7498556253d65c4684a11bf421a60ae42.tar.gz
nixpkgs-1c2523b7498556253d65c4684a11bf421a60ae42.tar.bz2
nixpkgs-1c2523b7498556253d65c4684a11bf421a60ae42.tar.lz
nixpkgs-1c2523b7498556253d65c4684a11bf421a60ae42.tar.xz
nixpkgs-1c2523b7498556253d65c4684a11bf421a60ae42.tar.zst
nixpkgs-1c2523b7498556253d65c4684a11bf421a60ae42.zip
treewide: fonts: reduce unneeded fetchzips
Diffstat (limited to 'pkgs/data/fonts/marathi-cursive')
-rw-r--r--pkgs/data/fonts/marathi-cursive/default.nix25
1 files changed, 15 insertions, 10 deletions
diff --git a/pkgs/data/fonts/marathi-cursive/default.nix b/pkgs/data/fonts/marathi-cursive/default.nix
index 8c228fd91a7..3dfb46fff69 100644
--- a/pkgs/data/fonts/marathi-cursive/default.nix
+++ b/pkgs/data/fonts/marathi-cursive/default.nix
@@ -1,19 +1,24 @@
-{ lib, fetchzip }:
+{ lib, stdenvNoCC, fetchurl }:
 
-let
+stdenvNoCC.mkDerivation rec {
+  pname = "marathi-cursive";
   version = "2.0";
-in fetchzip rec {
-  name = "marathi-cursive-${version}";
 
-  url = "https://github.com/MihailJP/MarathiCursive/releases/download/v${version}/MarathiCursive-${version}.tar.xz";
+  src = fetchurl {
+    url = "https://github.com/MihailJP/MarathiCursive/releases/download/v${version}/MarathiCursive-${version}.tar.xz";
+    hash = "sha256-JE9T3UMSYn/JfEWuWHikDJIlt4nZl6GzY98v3vG6di4=";
+  };
+
+  dontBuild = true;
+
+  installPhase = ''
+    runHook preInstall
 
-  postFetch = ''
-    tar -xJf $downloadedFile --strip-components=1
     install -m444 -Dt $out/share/fonts/marathi-cursive *.otf *.ttf
-    install -m444 -Dt $out/share/doc/${name} README *.txt
-  '';
+    install -m444 -Dt $out/share/doc/${pname}-${version} README *.txt
 
-  sha256 = "17pj60ajnjghxhxka8a046mz6vfwr79wnby7xd6pg5hgncin2hgg";
+    runHook postInstall
+  '';
 
   meta = with lib; {
     homepage = "https://github.com/MihailJP/MarathiCursive";