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/work-sans | |
parent | 3dd3562fa08e5a7cbe58c91b7f5b4aacd92d4012 (diff) |
treewide: convert 17 fonts to stdenvNoCC.mkDerivation
Diffstat (limited to 'pkgs/data/fonts/work-sans')
-rw-r--r-- | pkgs/data/fonts/work-sans/default.nix | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/pkgs/data/fonts/work-sans/default.nix b/pkgs/data/fonts/work-sans/default.nix index 208f370105798..07c5704b51713 100644 --- a/pkgs/data/fonts/work-sans/default.nix +++ b/pkgs/data/fonts/work-sans/default.nix @@ -1,15 +1,21 @@ -# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation' -{ lib, fetchzip }: +{ lib, stdenvNoCC, fetchzip }: -let +stdenvNoCC.mkDerivation rec { + pname = "work-sans"; version = "2.010"; -in -(fetchzip { - name = "work-sans-${version}"; - url = "https://github.com/weiweihuanghuang/Work-Sans/archive/refs/tags/v${version}.zip"; + src = fetchzip { + url = "https://github.com/weiweihuanghuang/Work-Sans/archive/refs/tags/v${version}.zip"; + hash = "sha256-cedcx3CpcPZk3jxxIs5Bz78dxZNtOemvXnUBO6zl2dw="; + }; + + installPhase = '' + runHook preInstall - sha256 = "sha256-S4O5EoKY4w/p+MHeHRCmPyQRAOUfEwNiETxMgNcsrws="; + install -Dm644 fonts/variable/*.ttf fonts/static/TTF/*.ttf -t $out/share/fonts/opentype + + runHook postInstall + ''; meta = with lib; { description = "A grotesque sans"; @@ -18,9 +24,4 @@ in maintainers = [ maintainers.marsam ]; platforms = platforms.all; }; -}).overrideAttrs (_: { - postFetch = '' - mkdir -p $out/share/fonts - unzip -j $downloadedFile "*/fonts/*.ttf" -d $out/share/fonts/opentype - ''; -}) +} |