Merge pull request #79756 from rnhmjoj/profont

profont: install otb variant
This commit is contained in:
Michele Guerini Rocco 2020-02-14 19:49:31 +01:00 committed by GitHub
commit c8d53312a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 14 deletions

View file

@ -1,29 +1,48 @@
{ lib, fetchzip }: { stdenv, fetchzip, mkfontscale }:
fetchzip { stdenv.mkDerivation {
name = "profont"; pname = "profont";
version = "2019-11";
url = "http://web.archive.org/web/20160707013914/http://tobiasjung.name/downloadfile.php?file=profont-x11.zip"; # Note: stripRoot doesn't work because the archive
# constains the metadata directory `__MACOSX`.
src = fetchzip {
url = "https://tobiasjung.name/downloadfile.php?file=profont-x11.zip";
sha256 = "12dbm87wvcpmn7nzgzwlk45cybp091diara8blqm6129ps27z6kb";
stripRoot = false;
} + /profont-x11;
postFetch = '' srcOtb = fetchzip {
unzip -j $downloadedFile url = "https://tobiasjung.name/downloadfile.php?file=profont-otb.zip";
sha256 = "18rfhfqrsj3510by0w1a7ak5as6r2cxh8xv02xc1y30mfa6g24x6";
stripRoot = false;
} + /profont-otb;
mkdir -p $out/share/doc/$name $out/share/fonts/misc dontBuild = true;
cp LICENSE $out/share/doc/$name/LICENSE nativeBuildInputs = [ mkfontscale ];
installPhase = ''
mkdir -p "$out/share/fonts/misc"
for f in *.pcf; do for f in *.pcf; do
gzip -c "$f" > $out/share/fonts/misc/"$f".gz gzip -n -9 -c "$f" > "$out/share/fonts/misc/$f.gz"
done done
install -D -m 644 LICENSE -t "$out/share/doc/$pname"
mkfontdir "$out/share/fonts/misc"
cd $srcOtb
install -D -m 644 profontn.otb -t $otb/share/fonts/misc
mkfontdir "$otb/share/fonts/misc"
''; '';
sha256 = "1calqmvrfv068w61f614la8mg8szas6m5i9s0lsmwjhb4qwjyxbw"; outputs = [ "out" "otb" ];
meta = with lib; { meta = with stdenv.lib; {
homepage = http://tobiasjung.name; homepage = https://tobiasjung.name/profont/;
description = "A monospaced font created to be a most readable font for programming"; description = "A monospaced font created to be a most readable font for programming";
maintainers = with lib.maintainers; [ myrl ]; maintainers = with maintainers; [ myrl ];
license = licenses.mit; license = licenses.mit;
platforms = platforms.all; platforms = platforms.all;
}; };
} }

View file

@ -17809,7 +17809,8 @@ in
inherit (darwin.apple_sdk.frameworks) Security; inherit (darwin.apple_sdk.frameworks) Security;
}; };
profont = callPackage ../data/fonts/profont { }; profont = callPackage ../data/fonts/profont
{ inherit (buildPackages.xorg) mkfontscale; };
proggyfonts = callPackage ../data/fonts/proggyfonts { }; proggyfonts = callPackage ../data/fonts/proggyfonts { };