about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/fonts/cabin/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/data/fonts/cabin/default.nix')
-rw-r--r--nixpkgs/pkgs/data/fonts/cabin/default.nix27
1 files changed, 16 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/data/fonts/cabin/default.nix b/nixpkgs/pkgs/data/fonts/cabin/default.nix
index e68d429db2e8..186a5359c44f 100644
--- a/nixpkgs/pkgs/data/fonts/cabin/default.nix
+++ b/nixpkgs/pkgs/data/fonts/cabin/default.nix
@@ -1,19 +1,24 @@
-{ lib, fetchFromGitHub }:
+{ lib, stdenvNoCC, fetchFromGitHub }:
 
-fetchFromGitHub rec {
-  name = "cabin-1.005";
+stdenvNoCC.mkDerivation rec {
+  pname = "cabin";
+  version = "1.005";
 
-  owner = "impallari";
-  repo = "Cabin";
-  rev = "982839c790e9dc57c343972aa34c51ed3b3677fd";
+  src = fetchFromGitHub {
+    owner = "impallari";
+    repo = "Cabin";
+    rev = "982839c790e9dc57c343972aa34c51ed3b3677fd";
+    hash = "sha256-9l4QcwCot340Bq41ER68HSZGQ9h0opyzgG3DG/fVZ5s=";
+  };
+
+  installPhase = ''
+    runHook preInstall
 
-  postFetch = ''
-    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
-  '';
+    install -m444 -Dt $out/share/doc/${pname}-${version} README.md FONTLOG.txt
 
-  sha256 = "1bl7h217m695jn4rbniialfk573aa44fslp2rjxnhkicakpcm44h";
+    runHook postInstall
+  '';
 
   meta = with lib; {
     description = "A humanist sans with 4 weights and true italics";