penna: migrate to stdenvNoCC, fix download link

This commit is contained in:
Minijackson 2023-01-22 11:22:07 +01:00
parent 4a66f56a79
commit 4e477329a9
No known key found for this signature in database
GPG key ID: FEA888C9F5D64F62

View file

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