default.nix 966 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. {
  2. lib,
  3. stdenvNoCC,
  4. fetchurl,
  5. p7zip,
  6. }:
  7. stdenvNoCC.mkDerivation rec {
  8. pname = "sarasa-gothic";
  9. version = "1.0.7";
  10. src = fetchurl {
  11. # Use the 'ttc' files here for a smaller closure size.
  12. # (Using 'ttf' files gives a closure size about 15x larger, as of November 2021.)
  13. url = "https://github.com/be5invis/Sarasa-Gothic/releases/download/v${version}/Sarasa-TTC-${version}.7z";
  14. hash = "sha256-EUQ4DZhxyLY8CZTwAk4ZLPCHvxHfoMr/4q+7bbmPo+M=";
  15. };
  16. sourceRoot = ".";
  17. nativeBuildInputs = [ p7zip ];
  18. installPhase = ''
  19. runHook preInstall
  20. mkdir -p $out/share/fonts/truetype
  21. cp *.ttc $out/share/fonts/truetype
  22. runHook postInstall
  23. '';
  24. meta = {
  25. description = "A CJK programming font based on Iosevka and Source Han Sans";
  26. homepage = "https://github.com/be5invis/Sarasa-Gothic";
  27. license = lib.licenses.ofl;
  28. maintainers = with lib.maintainers; [ ludovicopiero ];
  29. platforms = lib.platforms.all;
  30. };
  31. }