diff options
author | rnhmjoj <rnhmjoj@inventati.org> | 2020-02-10 19:27:31 +0100 |
---|---|---|
committer | rnhmjoj <rnhmjoj@inventati.org> | 2020-02-14 19:06:50 +0100 |
commit | 6979f761a5c86cccbcc8bf13670e402ee485e523 (patch) | |
tree | 1d78ad48ecfd7d138e79b2e5f827dc075b41cc4b /pkgs/data/fonts | |
parent | eaeb87add1ec31b3b088b65aa601b3c4f6d78e51 (diff) | |
download | nixlib-6979f761a5c86cccbcc8bf13670e402ee485e523.tar nixlib-6979f761a5c86cccbcc8bf13670e402ee485e523.tar.gz nixlib-6979f761a5c86cccbcc8bf13670e402ee485e523.tar.bz2 nixlib-6979f761a5c86cccbcc8bf13670e402ee485e523.tar.lz nixlib-6979f761a5c86cccbcc8bf13670e402ee485e523.tar.xz nixlib-6979f761a5c86cccbcc8bf13670e402ee485e523.tar.zst nixlib-6979f761a5c86cccbcc8bf13670e402ee485e523.zip |
profont: install otb variant
Diffstat (limited to 'pkgs/data/fonts')
-rw-r--r-- | pkgs/data/fonts/profont/default.nix | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/pkgs/data/fonts/profont/default.nix b/pkgs/data/fonts/profont/default.nix index 89565910f7a5..d1f2cd9c5af1 100644 --- a/pkgs/data/fonts/profont/default.nix +++ b/pkgs/data/fonts/profont/default.nix @@ -1,29 +1,48 @@ -{ lib, fetchzip }: +{ stdenv, fetchzip, mkfontscale }: -fetchzip { - name = "profont"; +stdenv.mkDerivation { + 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 = '' - unzip -j $downloadedFile + srcOtb = fetchzip { + 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 - gzip -c "$f" > $out/share/fonts/misc/"$f".gz + gzip -n -9 -c "$f" > "$out/share/fonts/misc/$f.gz" 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; { - homepage = http://tobiasjung.name; + meta = with stdenv.lib; { + homepage = https://tobiasjung.name/profont/; 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; platforms = platforms.all; }; + } |