about summary refs log tree commit diff
path: root/pkgs/applications/gis/grass
diff options
context:
space:
mode:
authorWill Cohen <willcohen@users.noreply.github.com>2022-01-26 07:44:26 -0500
committerWill Cohen <willcohen@users.noreply.github.com>2022-01-26 07:44:26 -0500
commit8b1103b60ebb2e5019a8c5893433dd5714449472 (patch)
tree20763d53268652bc909915cc662bf59af2dc1d30 /pkgs/applications/gis/grass
parentc205195d02141c498130d0d5b90f58717e34c466 (diff)
grass: fix build on darwin
Diffstat (limited to 'pkgs/applications/gis/grass')
-rw-r--r--pkgs/applications/gis/grass/default.nix23
1 files changed, 16 insertions, 7 deletions
diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix
index 16e6a818e5aef..5ca31cc040528 100644
--- a/pkgs/applications/gis/grass/default.nix
+++ b/pkgs/applications/gis/grass/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, fetchFromGitHub, flex, bison, pkg-config, zlib, libtiff, libpng, fftw
-, cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas
+, cairo, readline, ffmpeg, makeWrapper, wxGTK30, wxmac, netcdf, blas
 , proj, gdal, geos, sqlite, postgresql, libmysqlclient, python3Packages, libLAS, proj-datumgrid
 , zstd, pdal, wrapGAppsHook
 }:
@@ -16,10 +16,14 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo
-  readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql libmysqlclient blas
-  libLAS proj-datumgrid zstd pdal wrapGAppsHook ]
-    ++ (with python3Packages; [ python python-dateutil wxPython_4_1 numpy ]);
+  buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite
+  readline ffmpeg makeWrapper netcdf geos postgresql libmysqlclient blas
+  libLAS proj-datumgrid zstd wrapGAppsHook ]
+    ++ lib.optionals stdenv.isLinux [ cairo pdal wxGTK30 ]
+    ++ lib.optional stdenv.isDarwin wxmac
+    ++ (with python3Packages; [ python python-dateutil numpy ]
+      ++ lib.optional stdenv.isDarwin wxPython_4_0
+      ++ lib.optional stdenv.isLinux wxPython_4_1);
 
   # On Darwin the installer tries to symlink the help files into a system
   # directory
@@ -33,12 +37,11 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--with-proj-share=${proj}/share/proj"
     "--with-proj-includes=${proj.dev}/include"
-    "--with-proj-lib=${proj}/lib"
+    "--with-proj-libs=${proj}/lib"
     "--without-opengl"
     "--with-readline"
     "--with-wxwidgets"
     "--with-netcdf"
-    "--with-pdal"
     "--with-geos"
     "--with-postgres"
     "--with-postgres-libs=${postgresql.lib}/lib/"
@@ -51,6 +54,12 @@ stdenv.mkDerivation rec {
     "--with-zstd"
     "--with-fftw"
     "--with-pthread"
+  ] ++ lib.optionals stdenv.isLinux [
+    "--with-pdal"
+  ] ++ lib.optionals stdenv.isDarwin [
+    "--without-cairo"
+    "--without-freetype"
+    "--without-x"
   ];
 
   # Otherwise a very confusing "Can't load GDAL library" error