2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, google-fonts, migu, fontforge, which }:
|
2017-11-23 12:56:49 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "ricty";
|
2019-03-24 01:02:07 +01:00
|
|
|
version = "4.1.1";
|
2017-11-23 12:56:49 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-06-14 14:43:59 +02:00
|
|
|
url = "https://rictyfonts.github.io/files/ricty_generator-${version}.sh";
|
2019-03-24 01:02:07 +01:00
|
|
|
sha256 = "03fngb8f5hl7ifigdm5yljhs4z2x80cq8y8kna86d07ghknhzgw6";
|
2017-11-23 12:56:49 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
install -m 0770 $src ricty_generator.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's/fonts_directories=".*"/fonts_directories="$inconsolata $migu"/' ricty_generator.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ google-fonts migu fontforge which ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
inconsolata=${google-fonts} migu=${migu} ./ricty_generator.sh auto
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -m644 --target $out/share/fonts/truetype/ricty -D Ricty-*.ttf
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-11-23 12:56:49 +01:00
|
|
|
description = "A high-quality Japanese font based on Inconsolata and Migu 1M";
|
2021-06-14 14:43:59 +02:00
|
|
|
homepage = "https://rictyfonts.github.io";
|
2017-11-23 12:56:49 +01:00
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = [ maintainers.mikoim ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|