From 75c7f58507bba4db3cd6669355acb80efaebc908 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Mon, 9 Mar 2020 18:20:08 +0100 Subject: [PATCH 1/7] pythonPackages.meshlabxml: init at 2018.3 --- .../python-modules/meshlabxml/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/python-modules/meshlabxml/default.nix diff --git a/pkgs/development/python-modules/meshlabxml/default.nix b/pkgs/development/python-modules/meshlabxml/default.nix new file mode 100644 index 00000000000..c1091296d2e --- /dev/null +++ b/pkgs/development/python-modules/meshlabxml/default.nix @@ -0,0 +1,29 @@ +{ + buildPythonPackage, + fetchPypi, + pythonOlder, + lib, +}: + +buildPythonPackage rec { + pname = "MeshLabXML"; + version = "2018.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "1villmg46hqby5jjkkpxr5bxydr72y5b3cbfngwpyxxdljn091w8"; + }; + + propagatedBuildInputs = [ ]; + + doCheck = false; # Upstream not currently have any tests. + + pythonImportsCheck = [ "meshlabxml" ]; + + meta = with lib; { + homepage = "https://github.com/3DLIRIOUS/MeshLabXML"; + description = "Create and run MeshLab XML scripts with Python"; + license = licenses.lgpl21; + maintainers = with maintainers; [ nh2 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 712cb6da995..dc0a111eccb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4587,6 +4587,8 @@ in { mesonpep517 = callPackage ../development/python-modules/mesonpep517 { }; + meshlabxml = callPackage ../development/python-modules/meshlabxml { }; + metaphone = callPackage ../development/python-modules/metaphone { }; mezzanine = callPackage ../development/python-modules/mezzanine { }; From 0866700e3b8217f960ba363874a14b23d0138f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Thu, 25 Jun 2020 20:54:27 +0200 Subject: [PATCH 2/7] LASzip, LASzip2: Rename LASzip -> LASzip2, add LASzip 3. We have to keep the old one because libLAS does not support LASzip 3, see https://github.com/libLAS/libLAS/issues/144. --- pkgs/development/libraries/LASzip/LASzip2.nix | 21 +++++++++++++++++++ pkgs/development/libraries/LASzip/default.nix | 16 ++++++++------ pkgs/development/libraries/libLAS/default.nix | 8 ++++--- pkgs/top-level/all-packages.nix | 1 + 4 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 pkgs/development/libraries/LASzip/LASzip2.nix diff --git a/pkgs/development/libraries/LASzip/LASzip2.nix b/pkgs/development/libraries/LASzip/LASzip2.nix new file mode 100644 index 00000000000..418900ddeeb --- /dev/null +++ b/pkgs/development/libraries/LASzip/LASzip2.nix @@ -0,0 +1,21 @@ +{ stdenv, fetchurl, cmake }: + +stdenv.mkDerivation rec { + version = "2.2.0"; + pname = "LASzip"; + + src = fetchurl { + url = "https://github.com/LASzip/LASzip/archive/v${version}.tar.gz"; + sha256 = "b8e8cc295f764b9d402bc587f3aac67c83ed8b39f1cb686b07c168579c61fbb2"; + }; + + buildInputs = [cmake]; + + meta = { + description = "Turn quickly bulky LAS files into compact LAZ files without information loss"; + homepage = https://laszip.org; + license = stdenv.lib.licenses.lgpl2; + maintainers = [ stdenv.lib.maintainers.michelk ]; + platforms = stdenv.lib.platforms.unix; + }; +} diff --git a/pkgs/development/libraries/LASzip/default.nix b/pkgs/development/libraries/LASzip/default.nix index fb747dc9f33..0300aa37f0f 100644 --- a/pkgs/development/libraries/LASzip/default.nix +++ b/pkgs/development/libraries/LASzip/default.nix @@ -1,15 +1,19 @@ -{ stdenv, fetchurl, cmake }: +{ stdenv, fetchFromGitHub, cmake }: stdenv.mkDerivation rec { - version = "2.2.0"; + version = "3.4.3"; pname = "LASzip"; - src = fetchurl { - url = "https://github.com/LASzip/LASzip/archive/v${version}.tar.gz"; - sha256 = "b8e8cc295f764b9d402bc587f3aac67c83ed8b39f1cb686b07c168579c61fbb2"; + src = fetchFromGitHub { + owner = "LASzip"; + repo = "LASzip"; + rev = version; + sha256 = "09lcsgxwv0jq50fhsgfhx0npbf1zcwn3hbnq6q78fshqksbxmz7m"; }; - buildInputs = [cmake]; + nativeBuildInputs = [ + cmake + ]; meta = { description = "Turn quickly bulky LAS files into compact LAZ files without information loss"; diff --git a/pkgs/development/libraries/libLAS/default.nix b/pkgs/development/libraries/libLAS/default.nix index 818e2ad85b0..95569c0a813 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, fixDarwinDylibNames }: +{ stdenv, fetchurl, boost, cmake, gdal, libgeotiff, libtiff, LASzip2, fixDarwinDylibNames }: stdenv.mkDerivation rec { name = "libLAS-1.8.1"; @@ -9,13 +9,15 @@ stdenv.mkDerivation rec { sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws"; }; - buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip ] + buildInputs = [ boost cmake gdal libgeotiff libtiff LASzip2 ] ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames; cmakeFlags = [ "-DGDAL_CONFIG=${gdal}/bin/gdal-config" "-DWITH_LASZIP=ON" - "-DLASZIP_INCLUDE_DIR=${LASzip}/include" + # libLAS is currently not compatible with LASzip 3, + # see https://github.com/libLAS/libLAS/issues/144. + "-DLASZIP_INCLUDE_DIR=${LASzip2}/include" "-DCMAKE_EXE_LINKER_FLAGS=-pthread" ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d36b8cbbbcd..d2f70dbf8af 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12612,6 +12612,7 @@ in lasso = callPackage ../development/libraries/lasso { }; LASzip = callPackage ../development/libraries/LASzip { }; + LASzip2 = callPackage ../development/libraries/LASzip/LASzip2.nix { }; lcms = lcms1; From 8f753cb7fb8a6b77df1d5702f06690036f080144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Fri, 26 Jun 2020 00:43:15 +0200 Subject: [PATCH 3/7] LASzip2: Use `nativeBuildInputs` for `cmake` --- pkgs/development/libraries/LASzip/LASzip2.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/LASzip/LASzip2.nix b/pkgs/development/libraries/LASzip/LASzip2.nix index 418900ddeeb..e49909917c2 100644 --- a/pkgs/development/libraries/LASzip/LASzip2.nix +++ b/pkgs/development/libraries/LASzip/LASzip2.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "b8e8cc295f764b9d402bc587f3aac67c83ed8b39f1cb686b07c168579c61fbb2"; }; - buildInputs = [cmake]; + nativeBuildInputs = [ cmake ]; meta = { description = "Turn quickly bulky LAS files into compact LAZ files without information loss"; From a9850760d211701b42bb7c7f5690c7e082cffbbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Fri, 26 Jun 2020 00:53:37 +0200 Subject: [PATCH 4/7] LASzip2: Refactor: meta style Co-authored-by: Jon --- pkgs/development/libraries/LASzip/LASzip2.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/LASzip/LASzip2.nix b/pkgs/development/libraries/LASzip/LASzip2.nix index e49909917c2..2eb30963128 100644 --- a/pkgs/development/libraries/LASzip/LASzip2.nix +++ b/pkgs/development/libraries/LASzip/LASzip2.nix @@ -11,11 +11,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - meta = { + meta = with stdenv.lib; { description = "Turn quickly bulky LAS files into compact LAZ files without information loss"; - homepage = https://laszip.org; - license = stdenv.lib.licenses.lgpl2; - maintainers = [ stdenv.lib.maintainers.michelk ]; - platforms = stdenv.lib.platforms.unix; + homepage = "https://laszip.org"; + license = licenses.lgpl2; + maintainers = [ maintainers.michelk ]; + platforms = platforms.unix; }; } From f924c8b9cea92ac5e7eca7035b3d614afbdd9d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Thu, 25 Jun 2020 21:54:21 +0200 Subject: [PATCH 5/7] libe57format: init at 2.1 Originally contributed by @chpatrick. --- .../libraries/libe57format/default.nix | 55 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/libraries/libe57format/default.nix diff --git a/pkgs/development/libraries/libe57format/default.nix b/pkgs/development/libraries/libe57format/default.nix new file mode 100644 index 00000000000..6bb48c9530c --- /dev/null +++ b/pkgs/development/libraries/libe57format/default.nix @@ -0,0 +1,55 @@ +{ + stdenv, + cmake, + fetchFromGitHub, + boost, + xercesc, + icu, +}: + +stdenv.mkDerivation rec { + pname = "libe57format"; + version = "2.1"; + + src = fetchFromGitHub { + owner = "asmaloney"; + repo = "libE57Format"; + rev = "v${version}"; + sha256 = "05z955q68wjbd9gc5fw32nqg69xc82n2x75j5vchxzkgnn3adcpi"; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + boost + icu + xercesc + ]; + + # The build system by default builds ONLY static libraries, and with + # `-DE57_BUILD_SHARED=ON` builds ONLY shared libraries, see: + # https://github.com/asmaloney/libE57Format/issues/48 + # https://github.com/asmaloney/libE57Format/blob/f657d470da5f0d185fe371c4c011683f6e30f0cb/CMakeLists.txt#L82-L89 + # We support building both by building statically and then + # building an .so file here manually. + # The way this is written makes this Linux-only for now. + postInstall = '' + cd $out/lib + g++ -Wl,--no-undefined -shared -o libE57FormatShared.so -L. -Wl,-whole-archive -lE57Format -Wl,-no-whole-archive -lxerces-c + mv libE57FormatShared.so libE57Format.so + + if [ "$dontDisableStatic" -ne "1" ]; then + rm libE57Format.a + fi + ''; + + meta = with stdenv.lib; { + description = "Library for reading & writing the E57 file format (fork of E57RefImpl)"; + homepage = "https://github.com/asmaloney/libE57Format"; + license = licenses.boost; + maintainers = with maintainers; [ chpatrick nh2 ]; + platforms = platforms.linux; # because of the .so buiding in `postInstall` above + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d2f70dbf8af..a804a93e10a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12898,6 +12898,8 @@ in inherit (callPackage ../development/libraries/libdwarf { }) libdwarf dwarfdump; + libe57format = callPackage ../development/libraries/libe57format { }; + libeatmydata = callPackage ../development/libraries/libeatmydata { }; libeb = callPackage ../development/libraries/libeb { }; From 4e8e63f2784d2595cb9d64a57050f982e71926e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Thu, 25 Jun 2020 21:02:01 +0200 Subject: [PATCH 6/7] pdal: init at 2.1.0 --- pkgs/development/libraries/pdal/default.nix | 98 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 100 insertions(+) create mode 100644 pkgs/development/libraries/pdal/default.nix diff --git a/pkgs/development/libraries/pdal/default.nix b/pkgs/development/libraries/pdal/default.nix new file mode 100644 index 00000000000..2059b4db7fb --- /dev/null +++ b/pkgs/development/libraries/pdal/default.nix @@ -0,0 +1,98 @@ +{ stdenv +, fetchFromGitHub +, fetchpatch +, cmake +, pkg-config +# , openscenegraph +, curl +, gdal +, hdf5-cpp +, LASzip +, libe57format +, libgeotiff +, libxml2 +, postgresql +, tiledb +, xercesc +, zlib +, zstd +}: + +stdenv.mkDerivation rec { + pname = "pdal"; + version = "2.1.0"; + + src = fetchFromGitHub { + owner = "PDAL"; + repo = "PDAL"; + rev = version; + sha256 = "0zb3zjqgmjjryb648c1hmwh1nfa7893bjzbqpmr6shjxvzgnj9p6"; + }; + + patches = [ + # Fix duplicate paths like + # /nix/store/7iafqfmjdlxqim922618wg87cclrpznr-PDAL-2.1.0//nix/store/7iafqfmjdlxqim922618wg87cclrpznr-PDAL-2.1.0/lib + # similar to https://github.com/NixOS/nixpkgs/pull/82654. + # TODO Remove on release > 2.1.0 + (fetchpatch { + name = "pdal-Fixup-install-config.patch"; + url = "https://github.com/PDAL/PDAL/commit/2f887ef624db50c6e20f091f34bb5d3e65b5c5c8.patch"; + sha256 = "0pdw9v5ypq7w9i7qzgal110hjb9nqi386jvy3x2h4vf1dyalzid8"; + }) + ]; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + # openscenegraph + curl + gdal + hdf5-cpp + LASzip + libe57format + libgeotiff + libxml2 + postgresql + tiledb + xercesc + zlib + zstd + ]; + + cmakeFlags = [ + "-DBUILD_PLUGIN_E57=ON" + "-DBUILD_PLUGIN_HDF=ON" + "-DBUILD_PLUGIN_PGPOINTCLOUD=ON" + "-DBUILD_PLUGIN_TILEDB=ON" + + # Plugins that can probably be made working relatively easily: + # As of writing, seems to be incompatible (build error): + # error: no matching function for call to 'osg::TriangleFunctor::operator()(const Vec3&, const Vec3&, const Vec3&)' + "-DBUILD_PLUGIN_OPENSCENEGRAPH=OFF" # requires OpenGL + + # Plugins can probably not be made work easily: + "-DBUILD_PLUGIN_CPD=OFF" + "-DBUILD_PLUGIN_FBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs + "-DBUILD_PLUGIN_GEOWAVE=OFF" + "-DBUILD_PLUGIN_I3S=OFF" + "-DBUILD_PLUGIN_ICEBRIDGE=OFF" + "-DBUILD_PLUGIN_MATLAB=OFF" + "-DBUILD_PLUGIN_MBIO=OFF" + "-DBUILD_PLUGIN_MRSID=OFF" + "-DBUILD_PLUGIN_NITF=OFF" + "-DBUILD_PLUGIN_OCI=OFF" + "-DBUILD_PLUGIN_RDBLIB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs + "-DBUILD_PLUGIN_RIVLIB=OFF" + ]; + + meta = with stdenv.lib; { + description = "PDAL is Point Data Abstraction Library. GDAL for point cloud data."; + homepage = "https://pdal.io"; + license = licenses.bsd3; + maintainers = with maintainers; [ nh2 ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a804a93e10a..3bc95dea627 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14170,6 +14170,8 @@ in pcre2 = callPackage ../development/libraries/pcre2 { }; + pdal = callPackage ../development/libraries/pdal { } ; + pdf2xml = callPackage ../development/libraries/pdf2xml {} ; inherit (callPackage ../development/libraries/physfs { }) From 254c2fb8d0b429e460813716cc3effd7d6e3a720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Fri, 13 Mar 2020 16:27:42 +0100 Subject: [PATCH 7/7] cloudcompare: init at 2.11.0 Based on: https://git.computecanada.ca/nix/ccpkgs/commit/6118f8b2757fc436bdd62c6d7f10d36454dda481 --- .../graphics/cloudcompare/default.nix | 83 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 85 insertions(+) create mode 100644 pkgs/applications/graphics/cloudcompare/default.nix diff --git a/pkgs/applications/graphics/cloudcompare/default.nix b/pkgs/applications/graphics/cloudcompare/default.nix new file mode 100644 index 00000000000..84844191235 --- /dev/null +++ b/pkgs/applications/graphics/cloudcompare/default.nix @@ -0,0 +1,83 @@ +{ stdenv +, fetchFromGitHub +, cmake +, wrapQtAppsHook +, dxflib +, eigen +, flann +, gdal +, LASzip +, libLAS +, pdal +, qtbase +, qtsvg +, qttools +, tbb +, xercesc +}: + +stdenv.mkDerivation rec { + pname = "cloudcompare"; + version = "2.11.0"; + + src = fetchFromGitHub { + owner = "CloudCompare"; + repo = "CloudCompare"; + rev = "v${version}"; + sha256 = "02ahhhivgb9k1aygw1m35wdvhaizag1r98mb0r6zzrs5p4y64wlb"; + # As of writing includes (https://github.com/CloudCompare/CloudCompare/blob/a1c589c006fc325e8b560c77340809b9c7e7247a/.gitmodules): + # * libE57Format + # * PoissonRecon + # In > 2.11 it will also contain + # * CCCoreLib + fetchSubmodules = true; + }; + + nativeBuildInputs = [ + cmake + eigen # header-only + wrapQtAppsHook + ]; + + buildInputs = [ + dxflib + flann + gdal + LASzip + libLAS + pdal + qtbase + qtsvg + qttools + tbb + xercesc + ]; + + cmakeFlags = [ + # TODO: This will become -DCCCORELIB_USE_TBB=ON in > 2.11.0, see + # https://github.com/CloudCompare/CloudCompare/commit/f5a0c9fd788da26450f3fa488b2cf0e4a08d255f + "-DCOMPILE_CC_CORE_LIB_WITH_TBB=ON" + "-DOPTION_USE_DXF_LIB=ON" + "-DOPTION_USE_GDAL=ON" + "-DOPTION_USE_SHAPE_LIB=ON" + + "-DPLUGIN_GL_QEDL=ON" + "-DPLUGIN_GL_QSSAO=ON" + "-DPLUGIN_IO_QADDITIONAL=ON" + "-DPLUGIN_IO_QCORE=ON" + "-DPLUGIN_IO_QCSV_MATRIX=ON" + "-DPLUGIN_IO_QE57=ON" + "-DPLUGIN_IO_QFBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs + "-DPLUGIN_IO_QPDAL=ON" # required for .las/.laz support + "-DPLUGIN_IO_QPHOTOSCAN=ON" + "-DPLUGIN_IO_QRDB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs + ]; + + meta = with stdenv.lib; { + description = "3D point cloud and mesh processing software"; + homepage = "https://cloudcompare.org"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ nh2 ]; + platforms = with platforms; linux; # only tested here; might work on others + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3bc95dea627..fb8b46e57ba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10249,6 +10249,8 @@ in cloud-nuke = callPackage ../development/tools/cloud-nuke { }; + cloudcompare = libsForQt5.callPackage ../applications/graphics/cloudcompare {}; + cloudfoundry-cli = callPackage ../development/tools/cloudfoundry-cli { }; coan = callPackage ../development/tools/analysis/coan { };