about summary refs log tree commit diff
path: root/pkgs/data/fonts/cabin
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/cabin
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/cabin')
-rw-r--r--pkgs/data/fonts/cabin/default.nix18
1 files changed, 10 insertions, 8 deletions
diff --git a/pkgs/data/fonts/cabin/default.nix b/pkgs/data/fonts/cabin/default.nix
index 5bf4d454b0629..0a8168cdf9e20 100644
--- a/pkgs/data/fonts/cabin/default.nix
+++ b/pkgs/data/fonts/cabin/default.nix
@@ -1,19 +1,21 @@
-{ stdenv, fetchzip }:
+{ lib, fetchFromGitHub }:
 
-fetchzip rec {
+fetchFromGitHub rec {
   name = "cabin-1.005";
 
-  url = https://github.com/impallari/Cabin/archive/982839c790e9dc57c343972aa34c51ed3b3677fd.zip;
+  owner = "impallari";
+  repo = "Cabin";
+  rev = "982839c790e9dc57c343972aa34c51ed3b3677fd";
 
   postFetch = ''
-    mkdir -p $out/share/{doc,fonts}
-    unzip -j $downloadedFile \*.otf                    -d $out/share/fonts/opentype
-    unzip -j $downloadedFile \*README.md \*FONTLOG.txt -d "$out/share/doc/${name}"
+    tar xf $downloadedFile --strip=1
+    install -m444 -Dt $out/share/fonts/opentype fonts/OTF/*.otf
+    install -m444 -Dt $out/share/doc/${name}    README.md FONTLOG.txt
   '';
 
-  sha256 = "1ax5c2iab48qsk9zn3gjvqaib2lnlm25f1wr0aysf5ngw0y0jkrd";
+  sha256 = "1bl7h217m695jn4rbniialfk573aa44fslp2rjxnhkicakpcm44h";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A humanist sans with 4 weights and true italics";
     longDescription = ''
       The Cabin font family is a humanist sans with 4 weights and true italics,