vegur: migrate to stdenvNoCC, use upstream download link

upstream now version their URL
This commit is contained in:
Minijackson 2023-01-22 11:18:53 +01:00
parent 4e91b837f2
commit 616a088011
No known key found for this signature in database
GPG Key ID: FEA888C9F5D64F62

View File

@ -1,26 +1,32 @@
{ lib, buildPackages, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:
let
version = "0.701";
in fetchzip {
name = "vegur-font-${version}";
majorVersion = "0";
minorVersion = "701";
in
stdenvNoCC.mkDerivation (self: {
pname = "vegur";
version = "${majorVersion}.${minorVersion}";
# Upstream doesn't version their URLs.
# http://dotcolon.net/font/vegur/ → http://dotcolon.net/DL/font/vegur.zip
url = "http://download.opensuse.org/repositories/M17N:/fonts/SLE_12_SP3/src/dotcolon-vegur-fonts-0.701-1.4.src.rpm";
src = fetchzip {
url = "https://dotcolon.net/download/fonts/${self.pname}_${majorVersion}${minorVersion}.zip";
hash = "sha256-sGb3mEb3g15ZiVCxEfAanly8zMUopLOOjw8W4qbXLPA=";
stripRoot = false;
};
postFetch = ''
${buildPackages.rpmextract}/bin/rpmextract $downloadedFile
unzip vegur.zip
install -m444 -Dt $out/share/fonts/Vegur *.otf
installPhase = ''
runHook preInstall
install -D -m444 -t $out/share/fonts/opentype $src/*.otf
runHook postInstall
'';
sha256 = "0iisi2scq72lyj7pc1f36fhfjnm676n5byl4zaavhbxpdrbc6d1v";
meta = with lib; {
homepage = "http://dotcolon.net/font/vegur/";
description = "A humanist sans serif font";
platforms = platforms.all;
maintainers = [ maintainers.samueldr ];
maintainers = with maintainers; [ minijackson samueldr ];
license = licenses.cc0;
};
}
})