package.nix (1044B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 gdal, 7 geoflow, 8 geos, 9 nlohmann_json, 10 }: 11 12 stdenv.mkDerivation (finalAttrs: { 13 pname = "gfp-gdal"; 14 version = "0.3.1"; 15 16 __structuredAttrs = true; 17 18 src = fetchFromGitHub { 19 owner = "geoflow3d"; 20 repo = "gfp-gdal"; 21 tag = "v${finalAttrs.version}"; 22 hash = "sha256-u4u4xJm2FaCg2TO/CRtt284VrQgGrQhlDy24pfhr0Uw="; 23 fetchSubmodules = true; 24 }; 25 26 postPatch = '' 27 substituteInPlace CMakeLists.txt \ 28 --replace-fail "find_package( GDAL 3.5 REQUIRED )" \ 29 "find_package( GDAL CONFIG REQUIRED )" 30 ''; 31 32 nativeBuildInputs = [ cmake ]; 33 34 buildInputs = [ 35 gdal 36 geoflow 37 geos 38 nlohmann_json 39 ]; 40 41 env.NIX_CFLAGS_COMPILE = "-fpermissive"; 42 43 installPhase = '' 44 install -Dm644 gfp_gdal.so -t $out/lib/geoflow-plugins 45 ''; 46 47 meta = { 48 description = "OGR reader and writer for geoflow"; 49 homepage = "https://github.com/geoflow3d/gfp-gdal"; 50 license = lib.licenses.gpl3Plus; 51 maintainers = [ lib.maintainers.sikmir ]; 52 }; 53 })
