From ce4927f0d5d7f22f8773906743b0e6f13e635337 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Tue, 7 Dec 2021 10:14:41 +0000 Subject: qgis: enable 3D, grass Grass is a runtime dependency which qgis attempts to find on the path. 3D is on by default with normal distributions so we should also enable it. --- pkgs/applications/gis/qgis/default.nix | 5 +++-- pkgs/applications/gis/qgis/unwrapped.nix | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'pkgs/applications/gis') diff --git a/pkgs/applications/gis/qgis/default.nix b/pkgs/applications/gis/qgis/default.nix index f272fd04dd0d..65285c503f7d 100644 --- a/pkgs/applications/gis/qgis/default.nix +++ b/pkgs/applications/gis/qgis/default.nix @@ -1,5 +1,5 @@ { lib, makeWrapper, symlinkJoin -, qgis-unwrapped, extraPythonPackages ? (ps: [ ]) +, qgis-unwrapped, grass, extraPythonPackages ? (ps: [ ]) }: with lib; symlinkJoin rec { @@ -8,7 +8,7 @@ symlinkJoin rec { paths = [ qgis-unwrapped ]; - nativeBuildInputs = [ makeWrapper qgis-unwrapped.python3Packages.wrapPython ]; + nativeBuildInputs = [ grass makeWrapper qgis-unwrapped.python3Packages.wrapPython ]; # extend to add to the python environment of QGIS without rebuilding QGIS application. pythonInputs = qgis-unwrapped.pythonBuildInputs ++ (extraPythonPackages qgis-unwrapped.python3Packages); @@ -20,6 +20,7 @@ symlinkJoin rec { wrapProgram $out/bin/qgis \ --prefix PATH : $program_PATH \ + --prefix PATH : ${lib.makeBinPath [grass]} \ --set PYTHONPATH $program_PYTHONPATH ''; diff --git a/pkgs/applications/gis/qgis/unwrapped.nix b/pkgs/applications/gis/qgis/unwrapped.nix index 14bafb6c51bc..35ffbc5ba669 100644 --- a/pkgs/applications/gis/qgis/unwrapped.nix +++ b/pkgs/applications/gis/qgis/unwrapped.nix @@ -27,6 +27,7 @@ , qtsensors , qca-qt5 , qtkeychain +, qt3d , qscintilla , qtserialport , qtxmlpatterns @@ -96,6 +97,7 @@ in mkDerivation rec { qscintilla qtserialport qtxmlpatterns + qt3d ] ++ lib.optional withGrass grass ++ lib.optional withWebKit qtwebkit ++ pythonBuildInputs; @@ -113,10 +115,11 @@ in mkDerivation rec { cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=OFF" + "-DWITH_3D=True" "-DPYQT5_SIP_DIR=${python3Packages.pyqt5}/${python3Packages.python.sitePackages}/PyQt5/bindings" "-DQSCI_SIP_DIR=${python3Packages.qscintilla-qt5}/${python3Packages.python.sitePackages}/PyQt5/bindings" ] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF" - ++ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/${grass.name}"; + ++ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/grass78"; meta = { description = "A Free and Open Source Geographic Information System"; -- cgit 1.4.1