package.nix (1015B)
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 src = fetchFromGitHub { 17 owner = "geoflow3d"; 18 repo = "gfp-gdal"; 19 tag = "v${finalAttrs.version}"; 20 hash = "sha256-u4u4xJm2FaCg2TO/CRtt284VrQgGrQhlDy24pfhr0Uw="; 21 fetchSubmodules = true; 22 }; 23 24 postPatch = '' 25 substituteInPlace CMakeLists.txt \ 26 --replace-fail "find_package( GDAL 3.5 REQUIRED )" \ 27 "find_package( GDAL CONFIG REQUIRED )" 28 ''; 29 30 nativeBuildInputs = [ cmake ]; 31 32 buildInputs = [ 33 gdal 34 geoflow 35 geos 36 nlohmann_json 37 ]; 38 39 env.NIX_CFLAGS_COMPILE = "-fpermissive"; 40 41 installPhase = '' 42 install -Dm644 gfp_gdal.so -t $out/lib/geoflow-plugins 43 ''; 44 45 meta = { 46 description = "OGR reader and writer for geoflow"; 47 homepage = "https://github.com/geoflow3d/gfp-gdal"; 48 license = lib.licenses.gpl3Plus; 49 maintainers = [ lib.maintainers.sikmir ]; 50 }; 51 })
