nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.09 34 lines 936 B view raw
1{ stdenv, lib, fetchurl, pkgconfig, libxml2, sqlite, zlib, proj, geos, libiconv }: 2 3with lib; 4 5stdenv.mkDerivation rec { 6 name = "libspatialite-4.3.0a"; 7 8 src = fetchurl { 9 url = "https://www.gaia-gis.it/gaia-sins/libspatialite-sources/${name}.tar.gz"; 10 sha256 = "16d4lpl7xrm9zy4gphy6nwanpjp8wn9g4wq2i2kh8abnlhq01448"; 11 }; 12 13 nativeBuildInputs = [ pkgconfig ]; 14 15 buildInputs = [ libxml2 sqlite zlib proj geos libiconv ]; 16 17 configureFlags = [ "--disable-freexl" ]; 18 19 enableParallelBuilding = true; 20 21 CFLAGS = "-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1"; 22 23 postInstall = "" + optionalString stdenv.isDarwin '' 24 ln -s $out/lib/mod_spatialite.{so,dylib} 25 ''; 26 27 meta = { 28 description = "Extensible spatial index library in C++"; 29 homepage = "https://www.gaia-gis.it/fossil/libspatialite"; 30 # They allow any of these 31 license = with licenses; [ gpl2Plus lgpl21Plus mpl11 ]; 32 platforms = platforms.unix; 33 }; 34}