2021-05-29 03:34:57 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, geos
|
|
|
|
, librttopo
|
|
|
|
, libxml2
|
|
|
|
, minizip
|
|
|
|
, proj
|
|
|
|
, sqlite
|
|
|
|
, libiconv
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-05-29 03:34:57 +00:00
|
|
|
pname = "libspatialite";
|
|
|
|
version = "5.0.1";
|
|
|
|
|
|
|
|
outputs = [ "out" "dev" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-05-29 03:34:57 +00:00
|
|
|
url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "sha256-7svJQxHHgBLQWevA+uhupe9u7LEzA+boKzdTwbNAnpg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
buildInputs = [
|
|
|
|
geos
|
|
|
|
librttopo
|
|
|
|
libxml2
|
|
|
|
minizip
|
|
|
|
proj
|
|
|
|
sqlite
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
libiconv
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
configureFlags = [ "--disable-freexl" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
ln -s $out/lib/mod_spatialite.{so,dylib}
|
|
|
|
'';
|
|
|
|
|
2021-05-29 03:34:57 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Extensible spatial index library in C++";
|
|
|
|
homepage = "https://www.gaia-gis.it/fossil/libspatialite";
|
|
|
|
# They allow any of these
|
|
|
|
license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ];
|
|
|
|
platforms = platforms.unix;
|
2021-05-29 03:34:57 +00:00
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|