From 4e477329a935ce239fd3ce0d7fb2c762e1ec4efd Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 22 Jan 2023 11:22:07 +0100 Subject: [PATCH] penna: migrate to stdenvNoCC, fix download link --- pkgs/data/fonts/penna/default.nix | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/pkgs/data/fonts/penna/default.nix b/pkgs/data/fonts/penna/default.nix index 784f9d2573ef..893262f66e56 100644 --- a/pkgs/data/fonts/penna/default.nix +++ b/pkgs/data/fonts/penna/default.nix @@ -1,24 +1,29 @@ -{ lib, fetchzip }: +{ lib, stdenvNoCC, fetchzip }: let majorVersion = "0"; - minorVersion = "10"; - pname = "penna"; + minorVersion = "100"; in +stdenvNoCC.mkDerivation (self: { + pname = "penna"; + version = "${majorVersion}.${minorVersion}"; -fetchzip { - name = "${pname}-font-${majorVersion}.${minorVersion}"; + src = fetchzip { + url = "https://dotcolon.net/download/fonts/${self.pname}_${majorVersion}${minorVersion}.zip"; + hash = "sha256-fmCJnEaoUGdW9JK3J7JSm5D4qOMRW7qVKPgVE7uCH5w="; + stripRoot = false; + }; - url = "http://dotcolon.net/DL/font/${pname}.zip"; - sha256 = "0hk15yndm56l6rbdykpkry2flffx0567mgjcqcnsx1iyzwwla5km"; + installPhase = '' + runHook preInstall - postFetch = '' - mkdir -p $out/share/fonts/opentype/${pname} - unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype/${pname} + install -D -m444 -t $out/share/fonts/opentype $src/*.otf + + runHook postInstall ''; meta = with lib; { - homepage = "http://dotcolon.net/font/${pname}/"; + homepage = "http://dotcolon.net/font/${self.pname}/"; description = "Geometric sans serif designed by Sora Sagano"; longDescription = '' Penna is a geometric sans serif designed by Sora Sagano, @@ -26,7 +31,7 @@ fetchzip { with a small x-height. ''; platforms = platforms.all; - maintainers = with maintainers; [ leenaars ]; + maintainers = with maintainers; [ leenaars minijackson ]; license = licenses.cc0; }; -} +})