Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 74 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 freexl, 7 geos, 8 expat, 9 librttopo, 10 libspatialite, 11 libxml2, 12 libz, 13 minizip, 14 proj, 15 readosm, 16 sqlite, 17 testers, 18 spatialite-tools, 19}: 20 21stdenv.mkDerivation rec { 22 pname = "spatialite-tools"; 23 version = "5.1.0a"; 24 25 src = fetchurl { 26 url = "https://www.gaia-gis.it/gaia-sins/spatialite-tools-sources/spatialite-tools-${version}.tar.gz"; 27 hash = "sha256-EZ40dY6AiM27Q+2BtKbq6ojHZLC32hkAGlUUslRVAc4="; 28 }; 29 30 nativeBuildInputs = [ pkg-config ]; 31 32 buildInputs = [ 33 expat 34 freexl 35 geos 36 librttopo 37 libspatialite 38 libxml2 39 libz 40 minizip 41 proj 42 readosm 43 sqlite 44 ]; 45 46 env = { 47 NIX_LDFLAGS = toString [ 48 "-lxml2" 49 (lib.optionalString stdenv.hostPlatform.isDarwin "-liconv") 50 ]; 51 }; 52 53 enableParallelBuilding = true; 54 55 passthru.tests.version = testers.testVersion { 56 package = spatialite-tools; 57 command = "! spatialite_tool --version"; 58 version = "${libspatialite.version}"; 59 }; 60 61 meta = { 62 description = "Complete sqlite3-compatible CLI front-end for libspatialite"; 63 homepage = "https://www.gaia-gis.it/fossil/spatialite-tools"; 64 license = with lib.licenses; [ 65 mpl11 66 gpl2Plus 67 lgpl21Plus 68 ]; 69 platforms = lib.platforms.unix; 70 maintainers = with lib.maintainers; [ dotlambda ]; 71 teams = [ lib.teams.geospatial ]; 72 mainProgram = "spatialite_tool"; 73 }; 74}