Skip to content

Commit

Permalink
qgis, qgis-ltr: fix dependencies on darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
willcohen committed Mar 14, 2022
1 parent 8df0f8b commit acba11f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
13 changes: 11 additions & 2 deletions pkgs/applications/gis/qgis/default.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{ lib, makeWrapper, symlinkJoin
{ lib
, makeWrapper
, symlinkJoin
, extraPythonPackages ? (ps: [ ])
, darwin
, libsForQt5
}:

with lib;

let
qgis-unwrapped = libsForQt5.callPackage ./unwrapped.nix { };

qgis-unwrapped = libsForQt5.callPackage ./unwrapped.nix {
inherit (darwin.apple_sdk.libs) utmp;
};

in symlinkJoin rec {

inherit (qgis-unwrapped) version;
Expand Down
13 changes: 11 additions & 2 deletions pkgs/applications/gis/qgis/ltr.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{ lib, makeWrapper, symlinkJoin
{ lib
, makeWrapper
, symlinkJoin
, extraPythonPackages ? (ps: [ ])
, darwin
, libsForQt5
}:

with lib;

let
qgis-ltr-unwrapped = libsForQt5.callPackage ./unwrapped-ltr.nix { };

qgis-ltr-unwrapped = libsForQt5.callPackage ./unwrapped-ltr.nix {
inherit (pkgs.darwin.apple_sdk.libs) utmp;
};

in symlinkJoin rec {

inherit (qgis-ltr-unwrapped) version;
Expand Down
11 changes: 8 additions & 3 deletions pkgs/applications/gis/qgis/unwrapped-ltr.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ lib
, stdenv
, mkDerivation
, fetchFromGitHub
, cmake
Expand All @@ -19,6 +20,8 @@
, txt2tags
, openssl
, libzip
, libtasn1
, utmp
, hdf5
, netcdf
, exiv2
Expand Down Expand Up @@ -100,6 +103,7 @@ in mkDerivation rec {
postgresql
txt2tags
libzip
libtasn1
hdf5
netcdf
qtbase
Expand All @@ -110,10 +114,11 @@ in mkDerivation rec {
qtserialport
qtxmlpatterns
qt3d
pdal
zstd
] ++ lib.optional withGrass grass
++ lib.optional withWebKit qtwebkit
++ lib.optional stdenv.isLinux pdal
++ lib.optional stdenv.isDarwin utmp
++ pythonBuildInputs;

nativeBuildInputs = [ makeWrapper cmake flex bison ninja ];
Expand All @@ -130,11 +135,11 @@ in mkDerivation rec {
cmakeFlags = [
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
"-DWITH_3D=True"
"-DWITH_PDAL=TRUE"
"-DPYQT5_SIP_DIR=${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}/PyQt5/bindings"
"-DQSCI_SIP_DIR=${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}/PyQt5/bindings"
] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
++ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/grass78";
++ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/grass78"
++ lib.optional stdenv.isLinux "-DWITH_PDAL=TRUE";

postFixup = lib.optionalString withGrass ''
# grass has to be availble on the command line even though we baked in
Expand Down
11 changes: 8 additions & 3 deletions pkgs/applications/gis/qgis/unwrapped.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ lib
, stdenv
, mkDerivation
, fetchFromGitHub
, cmake
Expand All @@ -19,6 +20,8 @@
, txt2tags
, openssl
, libzip
, libtasn1
, utmp
, hdf5
, netcdf
, exiv2
Expand Down Expand Up @@ -100,6 +103,7 @@ in mkDerivation rec {
postgresql
txt2tags
libzip
libtasn1
hdf5
netcdf
qtbase
Expand All @@ -110,10 +114,11 @@ in mkDerivation rec {
qtserialport
qtxmlpatterns
qt3d
pdal
zstd
] ++ lib.optional withGrass grass
++ lib.optional withWebKit qtwebkit
++ lib.optional stdenv.isLinux pdal
++ lib.optional stdenv.isDarwin utmp
++ pythonBuildInputs;

nativeBuildInputs = [ makeWrapper cmake flex bison ninja ];
Expand All @@ -130,11 +135,11 @@ in mkDerivation rec {
cmakeFlags = [
"-DCMAKE_SKIP_BUILD_RPATH=OFF"
"-DWITH_3D=True"
"-DWITH_PDAL=TRUE"
"-DPYQT5_SIP_DIR=${py.pkgs.pyqt5}/${py.pkgs.python.sitePackages}/PyQt5/bindings"
"-DQSCI_SIP_DIR=${py.pkgs.qscintilla-qt5}/${py.pkgs.python.sitePackages}/PyQt5/bindings"
] ++ lib.optional (!withWebKit) "-DWITH_QTWEBKIT=OFF"
++ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/grass78";
++ lib.optional withGrass "-DGRASS_PREFIX7=${grass}/grass78"
++ lib.optional stdenv.isLinux "-DWITH_PDAL=TRUE";

postFixup = lib.optionalString withGrass ''
# grass has to be availble on the command line even though we baked in
Expand Down

0 comments on commit acba11f

Please sign in to comment.