about summary refs log tree commit diff
path: root/pkgs/data/fonts/xkcd-font
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/xkcd-font
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/xkcd-font')
-rw-r--r--pkgs/data/fonts/xkcd-font/default.nix23
1 files changed, 11 insertions, 12 deletions
diff --git a/pkgs/data/fonts/xkcd-font/default.nix b/pkgs/data/fonts/xkcd-font/default.nix
index 9aa664fd2896c..0e996da2fc7c9 100644
--- a/pkgs/data/fonts/xkcd-font/default.nix
+++ b/pkgs/data/fonts/xkcd-font/default.nix
@@ -1,24 +1,23 @@
-{ stdenv, fetchFromGitHub }:
+{ lib, fetchFromGitHub }:
 
-stdenv.mkDerivation rec {
+let
   pname = "xkcd-font";
   version = "unstable-2017-08-24";
+in fetchFromGitHub rec {
+  name = "${pname}-${version}";
 
-  src = fetchFromGitHub {
-    owner = "ipython";
-    repo = pname;
-    rev = "5632fde618845dba5c22f14adc7b52bf6c52d46d";
-    sha256 = "01wpfc1yp93b37r472mx2b459il5gywnv5sl7pp9afpycb3i4f6l";
-  };
-
-  phases = [ "unpackPhase" "installPhase" ];
+  owner = "ipython";
+  repo = pname;
+  rev = "5632fde618845dba5c22f14adc7b52bf6c52d46d";
 
-  installPhase = ''
+  postFetch = ''
+    tar xf $downloadedFile --strip=1
     install -Dm444 -t $out/share/fonts/opentype/ xkcd/build/xkcd.otf
     install -Dm444 -t $out/share/fonts/truetype/ xkcd-script/font/xkcd-script.ttf
   '';
+  sha256 = "0xhwa53aiz20763jb9nvbr2zq9k6jl69p07dc4b0apwrrwz0jfr1";
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "The xkcd font";
     homepage = https://github.com/ipython/xkcd-font;
     license = licenses.cc-by-nc-30;