diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-01-28 07:27:25 +0100 |
---|---|---|
committer | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-01-28 07:27:25 +0100 |
commit | a6e94af6ef5b526386567b6bd5f219c64a9c543b (patch) | |
tree | 1c95c6d4bd6aa1f88b3a2cc6c945cc69b81ad1e9 /pkgs/data/fonts/sudo | |
parent | 3dd3562fa08e5a7cbe58c91b7f5b4aacd92d4012 (diff) |
treewide: convert 17 fonts to stdenvNoCC.mkDerivation
Diffstat (limited to 'pkgs/data/fonts/sudo')
-rw-r--r-- | pkgs/data/fonts/sudo/default.nix | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/pkgs/data/fonts/sudo/default.nix b/pkgs/data/fonts/sudo/default.nix index c4af97c7cc253..dca4ccd200cb5 100644 --- a/pkgs/data/fonts/sudo/default.nix +++ b/pkgs/data/fonts/sudo/default.nix @@ -1,12 +1,21 @@ -# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation' -{ lib, fetchzip }: +{ lib, stdenvNoCC, fetchzip }: -let +stdenvNoCC.mkDerivation rec { + pname = "sudo-font"; version = "0.64"; -in (fetchzip { - name = "sudo-font-${version}"; - url = "https://github.com/jenskutilek/sudo-font/releases/download/v${version}/sudo.zip"; - sha256 = "sha256-ewLTeIVY76eq5mHTnjIsJ5Q2CMuBqXJzxvjZTONPsr8="; + + src = fetchzip { + url = "https://github.com/jenskutilek/sudo-font/releases/download/v${version}/sudo.zip"; + hash = "sha256-Y99YPoNpe55Wrj5epiqqQ6ddUBTj9uI4oj4M5ARTzJo="; + }; + + installPhase = '' + runHook preInstall + + install -Dm644 *.ttf -t $out/share/fonts/truetype/ + + runHook postInstall + ''; meta = with lib; { description = "Font for programmers and command line users"; @@ -16,9 +25,4 @@ in (fetchzip { maintainers = with maintainers; [ dtzWill ]; platforms = platforms.all; }; -}).overrideAttrs (_: { - postFetch = '' - mkdir -p $out/share/fonts/ - unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype/ - ''; -}) +} |