Merge pull request #191706 from sikmir/gaia-sins
spatialite_tools: enable on darwin, fix cross-compilation
This commit is contained in:
commit
94d8deeb8b
6 changed files with 84 additions and 22 deletions
|
@ -2,6 +2,7 @@
|
|||
, stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, freexl
|
||||
, geos
|
||||
, expat
|
||||
, librttopo
|
||||
|
@ -11,6 +12,8 @@
|
|||
, proj
|
||||
, readosm
|
||||
, sqlite
|
||||
, testers
|
||||
, spatialite_tools
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -18,14 +21,15 @@ stdenv.mkDerivation rec {
|
|||
version = "5.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-lgTCBeh/A3eJvFIwLGbM0TccPpjHTo7E4psHUt41Fxw=";
|
||||
url = "https://www.gaia-gis.it/gaia-sins/spatialite-tools-${version}.tar.gz";
|
||||
hash = "sha256-lgTCBeh/A3eJvFIwLGbM0TccPpjHTo7E4psHUt41Fxw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
expat
|
||||
freexl
|
||||
geos
|
||||
librttopo
|
||||
libspatialite
|
||||
|
@ -36,17 +40,20 @@ stdenv.mkDerivation rec {
|
|||
sqlite
|
||||
];
|
||||
|
||||
configureFlags = [ "--disable-freexl" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
NIX_LDFLAGS = "-lsqlite3";
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = spatialite_tools;
|
||||
command = "! spatialite_tool --version";
|
||||
version = "${libspatialite.version}";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A complete sqlite3-compatible CLI front-end for libspatialite";
|
||||
homepage = "https://www.gaia-gis.it/fossil/spatialite-tools";
|
||||
license = with licenses; [ mpl11 gpl2Plus lgpl21Plus ];
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
mainProgram = "spatialite_tool";
|
||||
};
|
||||
}
|
28
pkgs/development/libraries/freexl/default.nix
Normal file
28
pkgs/development/libraries/freexl/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, validatePkgConfig, libiconv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "freexl";
|
||||
version = "1.0.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.gaia-gis.it/gaia-sins/freexl-${version}.tar.gz";
|
||||
hash = "sha256-Pei1ej0TDLKIHqUtOqnOH+7bG1e32qTrN/dRQE+Q/CI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ validatePkgConfig ];
|
||||
|
||||
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A library to extract valid data from within an Excel (.xls) spreadsheet";
|
||||
homepage = "https://www.gaia-gis.it/fossil/freexl";
|
||||
# They allow any of these
|
||||
license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ];
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
};
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
, stdenv
|
||||
, fetchFromGitea
|
||||
, autoreconfHook
|
||||
, validatePkgConfig
|
||||
, geos
|
||||
}:
|
||||
|
||||
|
@ -19,14 +20,21 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
validatePkgConfig
|
||||
geos # for geos-config
|
||||
];
|
||||
|
||||
buildInputs = [ geos ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "RT Topology Library";
|
||||
homepage = "https://git.osgeo.org/gitea/rttopo/librttopo";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
, stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, validatePkgConfig
|
||||
, freexl
|
||||
, geos
|
||||
, librttopo
|
||||
, libxml2
|
||||
|
@ -18,13 +20,18 @@ stdenv.mkDerivation rec {
|
|||
outputs = [ "out" "dev" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-7svJQxHHgBLQWevA+uhupe9u7LEzA+boKzdTwbNAnpg=";
|
||||
url = "https://www.gaia-gis.it/gaia-sins/libspatialite-${version}.tar.gz";
|
||||
hash = "sha256-7svJQxHHgBLQWevA+uhupe9u7LEzA+boKzdTwbNAnpg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
validatePkgConfig
|
||||
geos # for geos-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
freexl
|
||||
geos
|
||||
librttopo
|
||||
libxml2
|
||||
|
@ -35,14 +42,22 @@ stdenv.mkDerivation rec {
|
|||
libiconv
|
||||
];
|
||||
|
||||
configureFlags = [ "--disable-freexl" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||
ln -s $out/lib/mod_spatialite.{so,dylib}
|
||||
'';
|
||||
|
||||
# Failed tests (linux & darwin):
|
||||
# - check_virtualtable6
|
||||
# - check_drop_rename
|
||||
doCheck = false;
|
||||
|
||||
preCheck = ''
|
||||
export LD_LIBRARY_PATH=$(pwd)/src/.libs
|
||||
export DYLD_LIBRARY_PATH=$(pwd)/src/.libs
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Extensible spatial index library in C++";
|
||||
homepage = "https://www.gaia-gis.it/fossil/libspatialite";
|
||||
|
|
|
@ -1,24 +1,26 @@
|
|||
{ lib, stdenv, fetchurl, expat, zlib, geos, libspatialite }:
|
||||
{ lib, stdenv, fetchurl, expat, zlib, validatePkgConfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "readosm";
|
||||
version = "1.1.0a";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.gaia-gis.it/gaia-sins/readosm-sources/${pname}-${version}.tar.gz";
|
||||
sha256 = "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v";
|
||||
url = "https://www.gaia-gis.it/gaia-sins/readosm-${version}.tar.gz";
|
||||
hash = "sha256-23wFHSVs7H7NTDd1q5vIINpaS/cv/U6fQLkR15dw8UU=";
|
||||
};
|
||||
|
||||
buildInputs = [ expat zlib geos libspatialite ];
|
||||
nativeBuildInputs = [ validatePkgConfig ];
|
||||
|
||||
configureFlags = [ "--disable-freexl" ];
|
||||
buildInputs = [ expat zlib ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source library to extract valid data from within an Open Street Map input file";
|
||||
homepage = "https://www.gaia-gis.it/fossil/readosm";
|
||||
license = with lib.licenses; [ mpl11 gpl2Plus lgpl21Plus ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = with licenses; [ mpl11 gpl2Plus lgpl21Plus ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -18315,6 +18315,8 @@ with pkgs;
|
|||
|
||||
freetype = callPackage ../development/libraries/freetype { };
|
||||
|
||||
freexl = callPackage ../development/libraries/freexl { };
|
||||
|
||||
frei0r = callPackage ../development/libraries/frei0r { };
|
||||
|
||||
fribidi = callPackage ../development/libraries/fribidi { };
|
||||
|
@ -21837,8 +21839,6 @@ with pkgs;
|
|||
|
||||
spaceship-prompt = callPackage ../shells/zsh/spaceship-prompt {};
|
||||
|
||||
spatialite_tools = callPackage ../development/libraries/spatialite-tools { };
|
||||
|
||||
spdk = callPackage ../development/libraries/spdk { };
|
||||
|
||||
speechd = callPackage ../development/libraries/speechd { };
|
||||
|
@ -26472,6 +26472,8 @@ with pkgs;
|
|||
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
||||
};
|
||||
|
||||
spatialite_tools = callPackage ../applications/gis/spatialite-tools { };
|
||||
|
||||
udig = callPackage ../applications/gis/udig { };
|
||||
|
||||
whitebox-tools = callPackage ../applications/gis/whitebox-tools {
|
||||
|
|
Loading…
Reference in a new issue