about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/liblangtag
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/liblangtag')
-rw-r--r--nixpkgs/pkgs/development/libraries/liblangtag/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/liblangtag/default.nix b/nixpkgs/pkgs/development/libraries/liblangtag/default.nix
new file mode 100644
index 000000000000..5a7f2fe4b36f
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblangtag/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, fetchurl, fetchFromBitbucket, autoreconfHook, gtk-doc, gettext
+, pkg-config, glib, libxml2, gobject-introspection, gnome-common, unzip
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liblangtag";
+  version = "0.6.3";
+
+  src = fetchFromBitbucket {
+    owner = "tagoh";
+    repo = pname;
+    rev = version;
+    sha256 = "10rycs8xrxzf9frzalv3qx8cs1jcildhrr4imzxdmr9f4l585z96";
+  };
+
+  core_zip = fetchurl {
+    # please update if an update is available
+    url = "http://www.unicode.org/Public/cldr/37/core.zip";
+    sha256 = "0myswkvvaxvrz9zwq4zh65sygfd9n72cd5rk4pwacqba4nxgb4xs";
+  };
+
+  language_subtag_registry = fetchurl {
+    url = "http://www.iana.org/assignments/language-subtag-registry";
+    sha256 = "0y9x5gra6jri4sk16f0dp69p06almnsl48rs85605f035kf539qm";
+  };
+
+  postPatch = ''
+    gtkdocize
+    cp "${core_zip}" data/core.zip
+    touch data/stamp-core-zip
+    cp "${language_subtag_registry}" data/language-subtag-registry
+  '';
+
+  configureFlags = [
+    "--with-locale-alias=${stdenv.cc.libc}/share/locale/locale.alias"
+  ];
+
+  buildInputs = [ gettext glib libxml2 gobject-introspection gnome-common
+    unzip ];
+  nativeBuildInputs = [ autoreconfHook gtk-doc gettext pkg-config ];
+
+  meta = {
+    inherit version;
+    description = "An interface library to access tags for identifying languages";
+    license = lib.licenses.mpl20;
+    maintainers = [lib.maintainers.raskin];
+    platforms = lib.platforms.linux;
+    # There are links to a homepage that are broken by a BitBucket change
+    homepage = "https://bitbucket.org/tagoh/liblangtag/overview";
+  };
+}