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; }; -} +})