Unverified Commit 58ce3164 authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #202346 from marsam/update-3270font

_3270font: 2.3.1 -> 3.0.1
parents 2efc26e8 f072ce13
Loading
Loading
Loading
Loading
+22 −13
Original line number Diff line number Diff line
{ lib, fetchzip }:
let
  version = "2.3.1";
in
fetchzip {
  name = "3270font-${version}";
{ lib, stdenvNoCC, fetchzip }:

  url = "https://github.com/rbanffy/3270font/releases/download/v${version}/3270_fonts_3b8f2fb.zip";
stdenvNoCC.mkDerivation rec {
  pname = "3270font";
  version = "3.0.1";

  sha256 = "06n87ydn2ayfhpg8318chmnwmdk3d4mmy65fcgf8frbiv2kpqncs";
  src = fetchzip {
    url = "https://github.com/rbanffy/3270font/releases/download/v${version}/3270_fonts_d916271.zip";
    sha256 = "sha256-Zi6Lp5+sqfjIaHmnaaemaw3i+hXq9mqIsK/81lTkwfM=";
    stripRoot = false;
  };

  dontPatch = true;
  dontConfigure = true;
  dontBuild = true;
  doCheck = false;
  dontFixup = true;

  installPhase = ''
    runHook preInstall

    install -Dm644 -t $out/share/fonts/opentype/ *.otf
    install -Dm644 -t $out/share/fonts/truetype/ *.ttf

  postFetch = ''
    mkdir -p $out/share/fonts/
    unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
    unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
    unzip -j $downloadedFile \*.afm -d $out/share/fonts/type1
    runHook postInstall
  '';

  meta = with lib; {