about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/fonts/quattrocento/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/data/fonts/quattrocento/default.nix')
-rw-r--r--nixpkgs/pkgs/data/fonts/quattrocento/default.nix27
1 files changed, 15 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/data/fonts/quattrocento/default.nix b/nixpkgs/pkgs/data/fonts/quattrocento/default.nix
index aa23175a04d4..a70396437ec1 100644
--- a/nixpkgs/pkgs/data/fonts/quattrocento/default.nix
+++ b/nixpkgs/pkgs/data/fonts/quattrocento/default.nix
@@ -1,25 +1,28 @@
-{ lib, fetchzip }:
+{ lib, stdenvNoCC, fetchzip }:
 
-let
+stdenvNoCC.mkDerivation rec {
+  pname = "quattrocento";
   version = "1.1";
-in fetchzip rec {
-  name = "quattrocento-${version}";
 
-  url = "https://web.archive.org/web/20170707001804/http://www.impallari.com/media/releases/quattrocento-v${version}.zip";
+  src = fetchzip {
+    url = "https://web.archive.org/web/20170707001804/http://www.impallari.com/media/releases/quattrocento-v${version}.zip";
+    hash = "sha256-ntY6Wl6TI8F7SShMyD8mdOxVg4oz9kvJ7vKTyGdPLtE=";
+  };
 
-  postFetch = ''
-    mkdir -p $out/share/{fonts,doc}
-    unzip -j $downloadedFile \*.otf        -d $out/share/fonts/opentype
-    unzip -j $downloadedFile \*FONTLOG.txt -d $out/share/doc/${name}
-  '';
+  installPhase = ''
+    runHook preInstall
 
-  sha256 = "0f8l19y61y20sszn8ni8h9kgl0zy1gyzychg22z5k93ip4h7kfd0";
+    install -Dm644 */*.otf     -t $out/share/fonts/opentype
+    install -Dm644 FONTLOG.txt -t $out/share/doc/${pname}-${version}
+
+    runHook postInstall
+  '';
 
   meta = with lib; {
     homepage = "http://www.impallari.com/quattrocento/";
     description = "A classic, elegant, sober and strong serif typeface";
     license = licenses.ofl;
     platforms = platforms.all;
-    maintainers = [maintainers.rycee];
+    maintainers = [ maintainers.rycee ];
   };
 }