summary refs log tree commit diff
path: root/pkgs/data/fonts/ricty
diff options
context:
space:
mode:
authorEshin Kunishima <ek@esh.ink>2017-11-23 20:56:49 +0900
committerEshin Kunishima <ek@esh.ink>2017-11-24 00:22:17 +0900
commit791616030f9905bf31f5664726dc3b5a64d61200 (patch)
treeb6cc0247196fa9b2128db92b84ff744931667311 /pkgs/data/fonts/ricty
parent8443352ffa539e02e28ae2b31cce200020014c7e (diff)
downloadnixpkgs-791616030f9905bf31f5664726dc3b5a64d61200.tar
nixpkgs-791616030f9905bf31f5664726dc3b5a64d61200.tar.gz
nixpkgs-791616030f9905bf31f5664726dc3b5a64d61200.tar.bz2
nixpkgs-791616030f9905bf31f5664726dc3b5a64d61200.tar.lz
nixpkgs-791616030f9905bf31f5664726dc3b5a64d61200.tar.xz
nixpkgs-791616030f9905bf31f5664726dc3b5a64d61200.tar.zst
nixpkgs-791616030f9905bf31f5664726dc3b5a64d61200.zip
ricty: init at 4.1.0
Diffstat (limited to 'pkgs/data/fonts/ricty')
-rw-r--r--pkgs/data/fonts/ricty/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/data/fonts/ricty/default.nix b/pkgs/data/fonts/ricty/default.nix
new file mode 100644
index 00000000000..add2c44cd48
--- /dev/null
+++ b/pkgs/data/fonts/ricty/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, google-fonts, migu, fontforge, which }:
+
+stdenv.mkDerivation rec {
+  name = "ricty-${version}";
+  version = "4.1.0";
+
+  src = fetchurl {
+      url = "http://www.rs.tus.ac.jp/yyusa/ricty/ricty_generator-${version}.sh";
+      sha256 = "1cv0xh81fi6zdjb62zqjw46kbc89jvwbyllw1x1xbnpz2il6aavf";
+  };
+
+  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
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A high-quality Japanese font based on Inconsolata and Migu 1M";
+    homepage = http://www.rs.tus.ac.jp/yyusa/ricty.html;
+    license = licenses.unfree;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.mikoim ];
+  };
+}
+