proggyfonts: rename name to pname&version (#193937)

This commit is contained in:
erdnaxe 2022-10-05 14:36:18 +02:00 committed by GitHub
parent b093aa5350
commit 9a2bba46e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,38 +1,41 @@
{ lib, stdenv, fetchurl, mkfontscale }:
stdenv.mkDerivation {
name = "proggyfonts-0.1";
stdenv.mkDerivation rec {
pname = "proggyfonts";
version = "0.1";
src = fetchurl {
url = "https://web.archive.org/web/20150801042353/http://kaictl.net/software/proggyfonts-0.1.tar.gz";
sha256 = "1plcm1sjpa3hdqhhin48fq6zmz3ndm4md72916hd8ff0w6596q0n";
url = "https://web.archive.org/web/20150801042353/http://kaictl.net/software/proggyfonts-${version}.tar.gz";
hash = "sha256-SsLzZdR5icVJNbr5rcCPbagPPtWghbqs2Jxmrtufsa4=";
};
nativeBuildInputs = [ mkfontscale ];
installPhase =
''
# compress pcf fonts
mkdir -p $out/share/fonts/misc
rm Speedy.pcf # duplicated as Speedy11.pcf
for f in *.pcf; do
gzip -n -9 -c "$f" > $out/share/fonts/misc/"$f".gz
done
dontConfigure = true;
dontBuild = true;
install -D -m 644 *.bdf -t "$out/share/fonts/misc"
install -D -m 644 *.ttf -t "$out/share/fonts/truetype"
install -D -m 644 Licence.txt -t "$out/share/doc/$name"
installPhase = ''
runHook preInstall
mkfontscale "$out/share/fonts/truetype"
mkfontdir "$out/share/fonts/misc"
'';
# compress pcf fonts
mkdir -p $out/share/fonts/misc
rm Speedy.pcf # duplicated as Speedy11.pcf
for f in *.pcf; do
gzip -n -9 -c "$f" > $out/share/fonts/misc/"$f".gz
done
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1x196rp3wqjd7m57bgp5kfy5jmj97qncxi1vwibs925ji7dqzfgf";
install -D -m 644 *.bdf -t "$out/share/fonts/misc"
install -D -m 644 *.ttf -t "$out/share/fonts/truetype"
install -D -m 644 Licence.txt -t "$out/share/doc/$name"
mkfontscale "$out/share/fonts/truetype"
mkfontdir "$out/share/fonts/misc"
runHook postInstall
'';
meta = with lib; {
homepage = "http://upperbounds.net";
homepage = "http://www.upperbounds.net";
description = "A set of fixed-width screen fonts that are designed for code listings";
license = licenses.mit;
platforms = platforms.all;