summary refs log tree commit diff
path: root/pkgs/data
diff options
context:
space:
mode:
authoryochai <yochai@users.noreply.github.com>2019-01-11 14:57:28 +0200
committermarkuskowa <markus.kowalewski@gmail.com>2019-01-11 13:57:28 +0100
commit10b50b661b8b0800cceb3806e2052377f784fa85 (patch)
tree2d4b31985c3cf062bfab6f596bd86632a787dff7 /pkgs/data
parent15ec5d03e6e5c5a9dbdcf68f8e3555e5d71c7356 (diff)
downloadnixpkgs-10b50b661b8b0800cceb3806e2052377f784fa85.tar
nixpkgs-10b50b661b8b0800cceb3806e2052377f784fa85.tar.gz
nixpkgs-10b50b661b8b0800cceb3806e2052377f784fa85.tar.bz2
nixpkgs-10b50b661b8b0800cceb3806e2052377f784fa85.tar.lz
nixpkgs-10b50b661b8b0800cceb3806e2052377f784fa85.tar.xz
nixpkgs-10b50b661b8b0800cceb3806e2052377f784fa85.tar.zst
nixpkgs-10b50b661b8b0800cceb3806e2052377f784fa85.zip
culmus: add .otf, .pfa and .afm files (#53638)
restructure into stdenv.mkDerivation. This resolves the problem of changing hashes.
Diffstat (limited to 'pkgs/data')
-rw-r--r--pkgs/data/fonts/culmus/default.nix19
1 files changed, 12 insertions, 7 deletions
diff --git a/pkgs/data/fonts/culmus/default.nix b/pkgs/data/fonts/culmus/default.nix
index ee41d9b88fb..4ef5a444558 100644
--- a/pkgs/data/fonts/culmus/default.nix
+++ b/pkgs/data/fonts/culmus/default.nix
@@ -2,19 +2,24 @@
 
 let
   version = "0.133";
-in fetchzip {
+in stdenv.mkDerivation {
   name = "culmus-${version}";
 
-  url = "mirror://sourceforge/culmus/culmus/${version}/culmus-${version}.tar.gz";
+  src = fetchzip {
+    url = "mirror://sourceforge/culmus/culmus/${version}/culmus-${version}.tar.gz";
+    sha256 = "0q80j3vixn364sc23hcy6098rkgy0kb4p91lky6224am1dwn2qmr";
+  };
 
-  postFetch = ''
-    tar -xzvf $downloadedFile --strip-components=1
-    mkdir -p $out/share/fonts/truetype
+  installPhase = ''
+    mkdir -p $out/share/fonts/{truetype,type1}
+    cp -v *.pfa $out/share/fonts/type1/
+    cp -v *.afm $out/share/fonts/type1/
+    cp -v fonts.scale-type1 $out/share/fonts/type1/fonts.scale
     cp -v *.ttf $out/share/fonts/truetype/
+    cp -v *.otf $out/share/fonts/truetype/
+    cp -v fonts.scale-ttf $out/share/fonts/truetype/fonts.scale
   '';
 
-  sha256 = "1jxg2wf4kwasp5cia00nki2lrcdnhsyh4yy7d05l0a9bim5hq2lr";
-
   meta = {
     description = "Culmus Hebrew fonts";
     longDescription = "The Culmus project aims at providing the Hebrew-speaking GNU/Linux and Unix community with a basic collection of Hebrew fonts for X Windows.";