nixpkgs/pkgs/by-name/sa/sarabun-font/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

42 lines
1.5 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "sarabun";
version = "unstable-2018-08-24";
src = fetchFromGitHub {
owner = "cadsondemak";
repo = pname;
rev = "854cdbc6afa002ff8c2ce6aa7b86f99c7f71c9eb";
sha256 = "jcSQ72WK0GucZPgG7IQKrKzCOEbGgbQVl21RIKSF6A0=";
};
outputs = [ "out" "doc" ];
buildPhase = ''
mkdir -p $doc/${pname} $out/share/fonts/truetype
cp -r $src/OFL.txt $src/docs/* $doc/${pname}
cp $src/fonts/*.ttf $out/share/fonts/truetype
'';
meta = {
homepage = "https://cadsondemak.github.io/${pname}/";
description = "Slightly-condensed looped Thai and sans serif Latin typeface for communications";
longDescription = ''
The most popular typeface from the 13 fonts from SIPA Thailands National
fonts project. Sarabun was designed by Suppakit Chalermlarp to be a
serious text face. Great choice for a long reading formal text. This font
was selected by the royal Thai government to be the official typeface for
documentation purpose. It was also adopted by many private organizations
to be used as a communication font. Sarabun has a slightly condensed
proportion which fits perfectly with Thai legibility. It also carries a
neutral Thai traditional loop design which can easily fit in with any
occasion. Probably one of the most todays familiar Thai loop typefaces.
'';
license = lib.licenses.ofl;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ toastal ];
};
}