about summary refs log tree commit diff
path: root/pkgs/data/fonts/libre-baskerville
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2019-05-13 01:55:32 +0000
committervolth <volth@volth.com>2019-05-13 06:03:31 +0000
commitc9eb44eab323aa43913b85af9a9a7f9e01f5e882 (patch)
treea36baf5677abb7e70cf56b483fe97ee6999fde91 /pkgs/data/fonts/libre-baskerville
parent1df1834dd1e47f9a1452fc271d7e0b4ba296e04d (diff)
data/fonts: cleanup
 * make font derivations fixed-output where applicable
 * fix dead links
 * `stdenv.lib` -> `lib` where `stdenv` is not involved
 * remove `meta.platforms = [ unix ]` and `meta.platforms = [ linux ]` because the restriction has no sense for data packages
Diffstat (limited to 'pkgs/data/fonts/libre-baskerville')
-rw-r--r--pkgs/data/fonts/libre-baskerville/default.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/data/fonts/libre-baskerville/default.nix b/pkgs/data/fonts/libre-baskerville/default.nix
index 18f236068a2f3..f5e6083f94466 100644
--- a/pkgs/data/fonts/libre-baskerville/default.nix
+++ b/pkgs/data/fonts/libre-baskerville/default.nix
@@ -1,19 +1,21 @@
-{ stdenv, fetchzip }:
+{ lib, fetchFromGitHub }:
 
-fetchzip rec {
+fetchFromGitHub rec {
   name = "libre-baskerville-1.000";
 
-  url = https://github.com/impallari/Libre-Baskerville/archive/2fba7c8e0a8f53f86efd3d81bc4c63674b0c613f.zip;
+  owner = "impallari";
+  repo = "Libre-Baskerville";
+  rev = "2fba7c8e0a8f53f86efd3d81bc4c63674b0c613f";
 
   postFetch = ''
-    mkdir -p $out/share/{doc,fonts}
-    unzip    -j $downloadedFile \*.ttf                    -d $out/share/fonts/truetype
-    unzip -n -j $downloadedFile \*README.md \*FONTLOG.txt -d "$out/share/doc/${name}"
+    tar xf $downloadedFile --strip=1
+    install -m444 -Dt $out/share/fonts/truetype *.ttf
+    install -m444 -Dt $out/share/doc/${name}    README.md FONTLOG.txt
   '';
 
-  sha256 = "0arlq89b3vmpw3n4wbllsdvqblhz6p09dm19z1cndicmcgk26w2a";
+  sha256 = "1kpji85d1mgwq8b4fh1isznrhsrv32la3wf058rwjmhx5a3l7yaj";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A webfont family optimized for body text";
     longDescription = ''
       Libre Baskerville is a webfont family optimized for body text. It's Based