nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

package.nix (1167B)


      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   src = fetchFromGitHub {
     19     owner = "geoflow3d";
     20     repo = "geoflow";
     21     tag = "v${finalAttrs.version}";
     22     hash = "sha256-tfMRyBhFgfdR8U9iu5o8QFBEToHi244AUA4IGhFmm+I=";
     23     fetchSubmodules = true;
     24   };
     25 
     26   postPatch = ''
     27     substituteInPlace apps/CMakeLists.txt --replace-fail "/Applications" "$out/Applications"
     28   '';
     29 
     30   nativeBuildInputs = [
     31     cmake
     32     pkg-config
     33   ];
     34 
     35   buildInputs = [
     36     glfw3
     37     gtk2
     38     nlohmann_json
     39     proj
     40     sqlite
     41   ];
     42 
     43   cmakeFlags = [
     44     (lib.cmakeFeature "GF_PLUGIN_FOLDER" "${placeholder "out"}/lib/geoflow-plugins")
     45   ];
     46 
     47   env.NIX_CFLAGS_COMPILE = toString (
     48     lib.optionals stdenv.cc.isClang [
     49       "-Wno-error=missing-template-arg-list-after-template-kw"
     50     ]
     51   );
     52 
     53   meta = {
     54     description = "flowchart tool for geo-spatial data processing";
     55     homepage = "https://github.com/geoflow3d/geoflow";
     56     license = lib.licenses.gpl3Plus;
     57     maintainers = [ lib.maintainers.sikmir ];
     58     mainProgram = "geof";
     59   };
     60 })