@@ -0,0 +1,52 @@
1+{stdenv, fetchurl, fetchFromBitbucket, autoreconfHook, gtkdoc, gettext
2+, pkgconfig, glib, libxml2, gobjectIntrospection, gnome-common, unzip
3+}:
4+
5+stdenv.mkDerivation rec {
6+ name = "${pname}-${version}";
7+ pname = "liblangtag";
8+ version = "0.6.1";
9+
10+ src = fetchFromBitbucket {
11+ owner = "tagoh";
12+ repo = "${pname}";
13+ rev = "${version}";
14+ sha256 = "19dk2qsg7f3ig9xz8d73jvikmf5kvrwi008wrz2psxinbdml442g";
15+ };
16+
17+ core_zip = fetchurl {
18+ # please update if an update is available
19+ url = "http://www.unicode.org/Public/cldr/33/core.zip";
20+ sha256 = "1faq1p5dmxpkczz6cjfsry7piksgym19cq2kf4jj2v885h490d7s";
21+ };
22+
23+ language_subtag_registry = fetchurl {
24+ url = "http://www.iana.org/assignments/language-subtag-registry";
25+ sha256 = "1qfkvllyqcy40vmnvjn5w9fxw7g6ww46cb306vkgcfghnjjfhv3b";
26+ };
27+
28+ postPatch = ''
29+ gtkdocize
30+ cp "${core_zip}" data/core.zip
31+ touch data/stamp-core-zip
32+ cp "${language_subtag_registry}" data/language-subtag-registry
33+ '';
34+
35+ configureFlags = [
36+ ''--with-locale-alias=${stdenv.cc.libc}/share/locale/locale.alias''
37+ ];
38+
39+ buildInputs = [ gettext glib libxml2 gobjectIntrospection gnome-common
40+ unzip ];
41+ nativeBuildInputs = [ autoreconfHook gtkdoc gettext pkgconfig ];
42+
43+ meta = {
44+ inherit version;
45+ description = "An interface library to access tags for identifying languages";
46+ license = stdenv.lib.licenses.mpl20;
47+ maintainers = [stdenv.lib.maintainers.raskin];
48+ platforms = stdenv.lib.platforms.linux;
49+ # There are links to a homepage that are broken by a BitBucket change
50+ homepage = "https://bitbucket.org/tagoh/liblangtag/overview";
51+ };
52+}