summary refs log tree commit diff
path: root/pkgs/data/fonts/paratype-pt/serif.nix
diff options
context:
space:
mode:
authorVolth <volth@webmaster.ms>2017-08-10 19:43:49 +0000
committerVolth <volth@webmaster.ms>2017-08-11 14:26:03 +0000
commit31c344982f0c47af4d33cb5a37125deb1d767ef0 (patch)
tree66227ecc2adcf14cc1a552364eb8940358199f5a /pkgs/data/fonts/paratype-pt/serif.nix
parent691da0cbb99c7b72480bc836b11cc296739edaee (diff)
downloadnixpkgs-31c344982f0c47af4d33cb5a37125deb1d767ef0.tar
nixpkgs-31c344982f0c47af4d33cb5a37125deb1d767ef0.tar.gz
nixpkgs-31c344982f0c47af4d33cb5a37125deb1d767ef0.tar.bz2
nixpkgs-31c344982f0c47af4d33cb5a37125deb1d767ef0.tar.lz
nixpkgs-31c344982f0c47af4d33cb5a37125deb1d767ef0.tar.xz
nixpkgs-31c344982f0c47af4d33cb5a37125deb1d767ef0.tar.zst
nixpkgs-31c344982f0c47af4d33cb5a37125deb1d767ef0.zip
data/fonts: simpler cleanups
Diffstat (limited to 'pkgs/data/fonts/paratype-pt/serif.nix')
-rw-r--r--pkgs/data/fonts/paratype-pt/serif.nix27
1 files changed, 10 insertions, 17 deletions
diff --git a/pkgs/data/fonts/paratype-pt/serif.nix b/pkgs/data/fonts/paratype-pt/serif.nix
index 323e10c8b7b..409aaf526f8 100644
--- a/pkgs/data/fonts/paratype-pt/serif.nix
+++ b/pkgs/data/fonts/paratype-pt/serif.nix
@@ -1,30 +1,23 @@
-{ stdenv, fetchurl, unzip }:
+{ stdenv, fetchzip }:
 
-stdenv.mkDerivation rec {
+fetchzip rec {
   name = "paratype-pt-serif";
 
-  src = fetchurl rec {
-    url = "http://www.paratype.ru/uni/public/PTSerif.zip";
-    sha256 = "0x3l58c1rvwmh83bmmgqwwbw9av1mvvq68sw2hdkyyihjvamyvvs";
-  };
-
-  buildInputs = [unzip];
+  url = "http://www.paratype.ru/uni/public/PTSerif.zip";
 
-  phases = "unpackPhase installPhase";
-  sourceRoot = ".";
-
-  installPhase = ''
-    mkdir -p $out/share/fonts/truetype
-    mkdir -p $out/share/doc/paratype
-    cp *.ttf $out/share/fonts/truetype
-    cp *.txt $out/share/doc/paratype
+  postFetch = ''
+    mkdir -p $out/share/{doc,fonts}
+    unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
+    unzip -j $downloadedFile \*.txt -d $out/share/doc/paratype
   '';
 
+  sha256 = "1iw5qi4ag3yp1lwmi91lb18gr768bqwl46xskaqnkhr9i9qp0v6d";
+
   meta = with stdenv.lib; {
     homepage = http://www.paratype.ru/public/; 
     description = "An open Paratype font";
 
-    license = "Open Paratype license"; 
+    license = "Open Paratype license";
     # no commercial distribution of the font on its own
     # must rename on modification
     # http://www.paratype.ru/public/pt_openlicense.asp