From 985cd571f390fd9f68de6c99916effe284d89f2c Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Mon, 16 Apr 2018 23:07:55 +0100 Subject: [PATCH 1/3] Build LASZip on unix --- pkgs/development/libraries/LASzip/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/LASzip/default.nix b/pkgs/development/libraries/LASzip/default.nix index df9d126ad719..384178d2c8df 100644 --- a/pkgs/development/libraries/LASzip/default.nix +++ b/pkgs/development/libraries/LASzip/default.nix @@ -16,6 +16,6 @@ stdenv.mkDerivation rec { homepage = http://www.laszip.org; license = stdenv.lib.licenses.lgpl2; maintainers = [ stdenv.lib.maintainers.michelk ]; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; }; } From 406e20b8329b51887801879bad0896aed693aef6 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Mon, 16 Apr 2018 23:08:17 +0100 Subject: [PATCH 2/3] Fix libLAS darwin build --- pkgs/development/libraries/libLAS/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libLAS/default.nix b/pkgs/development/libraries/libLAS/default.nix index 20531adcd1c7..aafcf86e4a62 100644 --- a/pkgs/development/libraries/libLAS/default.nix +++ b/pkgs/development/libraries/libLAS/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, boost, cmake, gdal, libgeotiff, libtiff, LASzip }: +{ stdenv, fetchurl, boost, cmake, gdal, libgeotiff, libtiff, LASzip, fixDarwinDylibNames }: stdenv.mkDerivation rec { name = "libLAS-1.8.1"; @@ -9,14 +9,22 @@ stdenv.mkDerivation rec { sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws"; }; - buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip ]; + buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip ] + ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; + cmakeFlags = [ + "-DGDAL_CONFIG=${gdal}/bin/gdal-config" + ]; + + postFixup = stdenv.lib.optionalString stdenv.isDarwin '' + install_name_tool -change "@rpath/liblas.3.dylib" "$out/lib/liblas.3.dylib" $out/lib/liblas_c.dylib + ''; meta = { description = "LAS 1.0/1.1/1.2 ASPRS LiDAR data translation toolset"; homepage = http://www.liblas.org; license = stdenv.lib.licenses.bsd3; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.unix; maintainers = [ stdenv.lib.maintainers.michelk ]; }; } From 577bbdc50148686e08b507a8920cf696e855da45 Mon Sep 17 00:00:00 2001 From: Jason Hilton Date: Thu, 7 Sep 2017 09:20:55 -0700 Subject: [PATCH 3/3] grass: compile with libLAS --- pkgs/applications/gis/grass/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/gis/grass/default.nix b/pkgs/applications/gis/grass/default.nix index d4e2043eaa75..b2404df8e56e 100644 --- a/pkgs/applications/gis/grass/default.nix +++ b/pkgs/applications/gis/grass/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, flex, bison, pkgconfig, zlib, libtiff, libpng, fftw , cairo, readline, ffmpeg, makeWrapper, wxGTK30, netcdf, blas -, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages +, proj, gdal, geos, sqlite, postgresql, mysql, python2Packages, libLAS }: stdenv.mkDerivation { @@ -12,7 +12,8 @@ stdenv.mkDerivation { nativeBuildInputs = [ pkgconfig ]; buildInputs = [ flex bison zlib proj gdal libtiff libpng fftw sqlite cairo - readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas ] + readline ffmpeg makeWrapper wxGTK30 netcdf geos postgresql mysql.connector-c blas + libLAS ] ++ (with python2Packages; [ python dateutil wxPython30 numpy ]); # On Darwin the installer tries to symlink the help files into a system @@ -33,6 +34,7 @@ stdenv.mkDerivation { "--with-mysql-includes=${mysql.connector-c}/include/mysql" "--with-mysql-libs=${mysql.connector-c}/lib/mysql" "--with-blas" + "--with-liblas=${libLAS}/bin/liblas-config" ]; # Otherwise a very confusing "Can't load GDAL library" error