package.nix (1196B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 glfw3, 8 gtk2, 9 nlohmann_json, 10 proj, 11 sqlite, 12 }: 13 14 stdenv.mkDerivation (finalAttrs: { 15 pname = "geoflow"; 16 version = "0.3.7"; 17 18 __structuredAttrs = true; 19 20 src = fetchFromGitHub { 21 owner = "geoflow3d"; 22 repo = "geoflow"; 23 tag = "v${finalAttrs.version}"; 24 hash = "sha256-tfMRyBhFgfdR8U9iu5o8QFBEToHi244AUA4IGhFmm+I="; 25 fetchSubmodules = true; 26 }; 27 28 postPatch = '' 29 substituteInPlace apps/CMakeLists.txt --replace-fail "/Applications" "$out/Applications" 30 ''; 31 32 nativeBuildInputs = [ 33 cmake 34 pkg-config 35 ]; 36 37 buildInputs = [ 38 glfw3 39 gtk2 40 nlohmann_json 41 proj 42 sqlite 43 ]; 44 45 cmakeFlags = [ 46 (lib.cmakeFeature "GF_PLUGIN_FOLDER" "${placeholder "out"}/lib/geoflow-plugins") 47 ]; 48 49 env.NIX_CFLAGS_COMPILE = toString ( 50 lib.optionals stdenv.cc.isClang [ 51 "-Wno-error=missing-template-arg-list-after-template-kw" 52 ] 53 ); 54 55 meta = { 56 description = "flowchart tool for geo-spatial data processing"; 57 homepage = "https://github.com/geoflow3d/geoflow"; 58 license = lib.licenses.gpl3Plus; 59 maintainers = [ lib.maintainers.sikmir ]; 60 mainProgram = "geof"; 61 }; 62 })
