about summary refs log tree commit diff
path: root/nixpkgs/pkgs/data/fonts/emacs-all-the-icons-fonts/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/data/fonts/emacs-all-the-icons-fonts/default.nix')
-rw-r--r--nixpkgs/pkgs/data/fonts/emacs-all-the-icons-fonts/default.nix29
1 files changed, 16 insertions, 13 deletions
diff --git a/nixpkgs/pkgs/data/fonts/emacs-all-the-icons-fonts/default.nix b/nixpkgs/pkgs/data/fonts/emacs-all-the-icons-fonts/default.nix
index 2f7a804ad08d..256084a320fc 100644
--- a/nixpkgs/pkgs/data/fonts/emacs-all-the-icons-fonts/default.nix
+++ b/nixpkgs/pkgs/data/fonts/emacs-all-the-icons-fonts/default.nix
@@ -1,18 +1,21 @@
-{ lib, fetchzip }:
+{ lib, stdenvNoCC, fetchzip }:
 
-let
+stdenvNoCC.mkDerivation rec {
+  pname = "emacs-all-the-icons-fonts";
   version = "5.0.0";
-in fetchzip {
-  name = "emacs-all-the-icons-fonts-${version}";
 
-  url = "https://github.com/domtronn/all-the-icons.el/archive/${version}.zip";
+  src = fetchzip {
+    url = "https://github.com/domtronn/all-the-icons.el/archive/${version}.zip";
+    hash = "sha256-70ysVxOey6NLlCwhEYhxpxO6uuarMFDpg3Efh+3bj1M=";
+  };
 
-  postFetch = ''
-    mkdir -p $out/share/fonts
-    unzip -j $downloadedFile \*.ttf -d $out/share/fonts/all-the-icons
-  '';
+  installPhase = ''
+    runHook preInstall
 
-  sha256 = "0vc9bkm4pcc05llcd2c9zr3d88h3zmci0izla5wnw8hg1n0rsrii";
+    install -Dm644 fonts/*.ttf -t $out/share/fonts/all-the-icons
+
+    runHook postInstall
+  '';
 
   meta = with lib; {
     description = "Icon fonts for emacs all-the-icons";
@@ -24,9 +27,9 @@ in fetchzip {
     homepage = "https://github.com/domtronn/all-the-icons.el";
 
     /*
-    The fonts come under a mixture of licenses - the MIT license,
-    SIL OFL license, and Apache license v2.0. See the GitHub page
-    for further information.
+      The fonts come under a mixture of licenses - the MIT license,
+      SIL OFL license, and Apache license v2.0. See the GitHub page
+      for further information.
     */
     license = licenses.free;
     platforms = platforms.all;