liblangtag: enable on darwin

This commit is contained in:
Dmitry Kalinkin 2021-06-12 00:02:12 -04:00
parent 24f34c1b90
commit 36a4ae8c05
No known key found for this signature in database
GPG key ID: 5157B3EC8B2CA333

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, fetchFromBitbucket, autoreconfHook, gtk-doc, gettext { lib, stdenv, fetchurl, autoreconfHook, gtk-doc, gettext
, pkg-config, glib, libxml2, gobject-introspection, gnome-common, unzip , pkg-config, glib, libxml2, gobject-introspection, gnome-common, unzip
}: }:
@ -6,11 +6,10 @@ stdenv.mkDerivation rec {
pname = "liblangtag"; pname = "liblangtag";
version = "0.6.3"; version = "0.6.3";
src = fetchFromBitbucket { # Artifact tarball contains lt-localealias.h needed for darwin
owner = "tagoh"; src = fetchurl {
repo = pname; url = "https://bitbucket.org/tagoh/liblangtag/downloads/${pname}-${version}.tar.bz2";
rev = version; sha256 = "sha256-HxKiCgLsOo0i5U3tuLaDpDycFgvaG6M3vxBgYHrnM70=";
sha256 = "10rycs8xrxzf9frzalv3qx8cs1jcildhrr4imzxdmr9f4l585z96";
}; };
core_zip = fetchurl { core_zip = fetchurl {
@ -31,19 +30,19 @@ stdenv.mkDerivation rec {
cp "${language_subtag_registry}" data/language-subtag-registry cp "${language_subtag_registry}" data/language-subtag-registry
''; '';
configureFlags = [ configureFlags =
"--with-locale-alias=${stdenv.cc.libc}/share/locale/locale.alias" lib.optional
]; (stdenv.hostPlatform.libc == "glibc")
"--with-locale-alias=${stdenv.cc.libc}/share/locale/locale.alias";
buildInputs = [ gettext glib libxml2 gobject-introspection gnome-common ]; buildInputs = [ gettext glib libxml2 gobject-introspection gnome-common ];
nativeBuildInputs = [ autoreconfHook gtk-doc gettext pkg-config unzip ]; nativeBuildInputs = [ autoreconfHook gtk-doc gettext pkg-config unzip ];
meta = { meta = with lib; {
inherit version;
description = "An interface library to access tags for identifying languages"; description = "An interface library to access tags for identifying languages";
license = lib.licenses.mpl20; license = licenses.mpl20;
maintainers = [lib.maintainers.raskin]; maintainers = [ maintainers.raskin ];
platforms = lib.platforms.linux; platforms = platforms.unix;
# There are links to a homepage that are broken by a BitBucket change # There are links to a homepage that are broken by a BitBucket change
homepage = "https://bitbucket.org/tagoh/liblangtag/overview"; homepage = "https://bitbucket.org/tagoh/liblangtag/overview";
}; };