NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.37k stars 14.32k forks source link

Package request: LXGW WenKai TC #307034

Closed lebensterben closed 6 months ago

lebensterben commented 7 months ago

Project description

LXGW WenKai TC is the Traditional Chinese Edition of LXGW WenKai, where the latter has already been packaged as lxgw-wenkai.

Metadata


Below is a working package build script I tested locally, which is largely based on lxgw-wenkai's script:

{
  stdenvNoCC,
  fetchurl,
  lib,
  ...
}:
stdenvNoCC.mkDerivation rec {
  pname = "lxgw-wenkai-tc";
  version = "1.320";
  src = fetchurl {
    url = "https://github.com/lxgw/LxgwWenKaiTC/releases/download/v${version}/${pname}-v${version}.tar.gz";
    hash = "sha256-CF9zwVrNGN0rUCoe54Lk+6GWqVRCbG/XFkbF+0lk7lM=";
  };

  installPhase = ''
    runHook preInstall

    mkdir -p $out/share/fonts/truetype
    mv *.ttf $out/share/fonts/truetype

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://github.com/lxgw/LxgwWenKaiTC";
    description = "The Traditional Chinese Edition of LXGW WenKai.";
    license = licenses.ofl;
    platforms = platforms.all;
    #maintainers = with maintainers; [ lucius ];
  };
}

(I commented out meta.maintainers field.)

Atemu commented 7 months ago

If that snippet is working, could you turn it into a PR? It looks good enough for inclusion to me.