about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2017-06-10 09:32:34 +0100
committerGitHub <noreply@github.com>2017-06-10 09:32:34 +0100
commitb731e65081aa0bdb065e637b85b9e4a02e1a4c99 (patch)
treed16315b6b724e2885ece7402a8f39ef4874a41c3
parentc1d05287d62091115e5963a324ef3bb45b0dc3f5 (diff)
parent6e604ec68c2f849dad045194bf3701202c0ed4ec (diff)
downloadnixlib-b731e65081aa0bdb065e637b85b9e4a02e1a4c99.tar
nixlib-b731e65081aa0bdb065e637b85b9e4a02e1a4c99.tar.gz
nixlib-b731e65081aa0bdb065e637b85b9e4a02e1a4c99.tar.bz2
nixlib-b731e65081aa0bdb065e637b85b9e4a02e1a4c99.tar.lz
nixlib-b731e65081aa0bdb065e637b85b9e4a02e1a4c99.tar.xz
nixlib-b731e65081aa0bdb065e637b85b9e4a02e1a4c99.tar.zst
nixlib-b731e65081aa0bdb065e637b85b9e4a02e1a4c99.zip
arphic: init at 0.2.20080216.2
arphic: init at 0.2.20080216.2
-rw-r--r--lib/licenses.nix5
-rw-r--r--pkgs/data/fonts/arphic/default.nix65
-rw-r--r--pkgs/top-level/all-packages.nix3
3 files changed, 73 insertions, 0 deletions
diff --git a/lib/licenses.nix b/lib/licenses.nix
index 0919699b41e3..8dd1c210b7fa 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -45,6 +45,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
     fullName = "Apple Public Source License 2.0";
   };
 
+  arphicpl = {
+    fullName = "Arphic Public License";
+    url = https://www.freedesktop.org/wiki/Arphic_Public_License/;
+  };
+
   artistic1 = spdx {
     spdxId = "Artistic-1.0";
     fullName = "Artistic License 1.0";
diff --git a/pkgs/data/fonts/arphic/default.nix b/pkgs/data/fonts/arphic/default.nix
new file mode 100644
index 000000000000..b392ac79b2da
--- /dev/null
+++ b/pkgs/data/fonts/arphic/default.nix
@@ -0,0 +1,65 @@
+{ stdenv, fetchurl, mkfontscale, mkfontdir }:
+
+{
+  arphic-ukai = stdenv.mkDerivation rec {
+    name = "arphic-ukai-${version}";
+
+    version = "0.2.20080216.2";
+
+    src = fetchurl {
+      url = "http://archive.ubuntu.com/ubuntu/pool/main/f/fonts-arphic-ukai/fonts-arphic-ukai_${version}.orig.tar.bz2";
+      sha256 = "1lp3i9m6x5wrqjkh1a8vpyhmsrhvsa2znj2mx13qfkwza5rqv5ml";
+    };
+
+    buildInputs = [ mkfontscale mkfontdir ];
+
+    phases = [ "unpackPhase" "installPhase" ];
+
+    installPhase = ''
+      install -D -v ukai.ttc $out/share/fonts/truetype/arphic-ukai.ttc
+      cd $out/share/fonts
+      mkfontdir
+      mkfontscale
+    '';
+
+    meta = with stdenv.lib; {
+      description = "CJK Unicode font Kai style";
+      homepage = https://www.freedesktop.org/wiki/Software/CJKUnifonts/;
+
+      license = licenses.arphicpl;
+      maintainers = [ maintainers.changlinli ];
+      platforms = platforms.all;
+    };
+  };
+
+  arphic-uming = stdenv.mkDerivation rec {
+    name = "arphic-uming-${version}";
+
+    version = "0.2.20080216.2";
+
+    src = fetchurl {
+      url = "http://archive.ubuntu.com/ubuntu/pool/main/f/fonts-arphic-uming/fonts-arphic-uming_${version}.orig.tar.bz2";
+      sha256 = "1ny11n380vn7sryvy1g3a83y3ll4h0jf9wgnrx55nmksx829xhg3";
+    };
+
+    buildInputs = [ mkfontscale mkfontdir ];
+
+    phases = [ "unpackPhase" "installPhase" ];
+
+    installPhase = ''
+      install -D -v uming.ttc $out/share/fonts/truetype/arphic-uming.ttc
+      cd $out/share/fonts
+      mkfontdir
+      mkfontscale
+    '';
+
+    meta = with stdenv.lib; {
+      description = "CJK Unicode font Ming style";
+      homepage = https://www.freedesktop.org/wiki/Software/CJKUnifonts/;
+
+      license = licenses.arphicpl;
+      maintainers = [ maintainers.changlinli ];
+      platforms = platforms.all;
+    };
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 4a1eafa6b67e..6615c95e57a4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -474,6 +474,9 @@ with pkgs;
 
   arp-scan = callPackage ../tools/misc/arp-scan { };
 
+  inherit (callPackages ../data/fonts/arphic {})
+    arphic-ukai arphic-uming;
+
   artyFX = callPackage ../applications/audio/artyFX {};
 
   as31 = callPackage ../development/compilers/as31 {};