nixpkgs/pkgs/development/libraries/liblangtag/default.nix

51 lines
1.5 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, fetchFromBitbucket, autoreconfHook, gtk-doc, gettext
, pkg-config, glib, libxml2, gobject-introspection, gnome-common, unzip
2018-05-01 22:22:23 +00:00
}:
stdenv.mkDerivation rec {
pname = "liblangtag";
2020-11-24 16:44:53 +00:00
version = "0.6.3";
2018-05-01 22:22:23 +00:00
src = fetchFromBitbucket {
owner = "tagoh";
2019-09-08 23:38:31 +00:00
repo = pname;
rev = version;
2020-11-24 16:44:53 +00:00
sha256 = "10rycs8xrxzf9frzalv3qx8cs1jcildhrr4imzxdmr9f4l585z96";
2018-05-01 22:22:23 +00:00
};
core_zip = fetchurl {
# please update if an update is available
2020-11-24 16:44:53 +00:00
url = "http://www.unicode.org/Public/cldr/37/core.zip";
sha256 = "0myswkvvaxvrz9zwq4zh65sygfd9n72cd5rk4pwacqba4nxgb4xs";
2018-05-01 22:22:23 +00:00
};
language_subtag_registry = fetchurl {
url = "http://www.iana.org/assignments/language-subtag-registry";
sha256 = "0y9x5gra6jri4sk16f0dp69p06almnsl48rs85605f035kf539qm";
2018-05-01 22:22:23 +00:00
};
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"
2018-05-01 22:22:23 +00:00
];
buildInputs = [ gettext glib libxml2 gobject-introspection gnome-common ];
nativeBuildInputs = [ autoreconfHook gtk-doc gettext pkg-config unzip ];
2018-05-01 22:22:23 +00:00
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;
2018-05-01 22:22:23 +00:00
# There are links to a homepage that are broken by a BitBucket change
homepage = "https://bitbucket.org/tagoh/liblangtag/overview";
};
}