Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / pdal / default.nix
blob1c11e4d449e19b4729244e8718ba6aeb2ff774bf
1 { lib, stdenv
2 , fetchFromGitHub
3 , fetchpatch
4 , cmake
5 , pkg-config
6 , openscenegraph
7 , curl
8 , gdal
9 , hdf5-cpp
10 , LASzip
11 , enableE57 ? lib.meta.availableOn stdenv.hostPlatform libe57format
12 , libe57format
13 , libgeotiff
14 , libtiff
15 , libxml2
16 , postgresql
17 , tiledb
18 , xercesc
19 , zlib
20 , zstd
23 stdenv.mkDerivation rec {
24   pname = "pdal";
25   version = "2.5.6";
27   src = fetchFromGitHub {
28     owner = "PDAL";
29     repo = "PDAL";
30     rev = version;
31     sha256 = "sha256-JKwa89c05EfZ/FxOkj8lYmw0o2EgSqafRDIV2mTpZ5E=";
32   };
34   nativeBuildInputs = [
35     cmake
36     pkg-config
37   ];
39   buildInputs = [
40     openscenegraph
41     curl
42     gdal
43     hdf5-cpp
44     LASzip
45     libgeotiff
46     libtiff
47     libxml2
48     postgresql
49     tiledb
50     xercesc
51     zlib
52     zstd
53   ] ++ lib.optionals enableE57 [
54     libe57format
55   ];
57   cmakeFlags = [
58     "-DBUILD_PLUGIN_E57=${if enableE57 then "ON" else "OFF"}"
59     "-DBUILD_PLUGIN_HDF=ON"
60     "-DBUILD_PLUGIN_PGPOINTCLOUD=ON"
61     "-DBUILD_PLUGIN_TILEDB=ON"
63     # Plugins can probably not be made work easily:
64     "-DBUILD_PLUGIN_CPD=OFF"
65     "-DBUILD_PLUGIN_FBX=OFF" # Autodesk FBX SDK is gratis+proprietary; not packaged in nixpkgs
66     "-DBUILD_PLUGIN_GEOWAVE=OFF"
67     "-DBUILD_PLUGIN_I3S=OFF"
68     "-DBUILD_PLUGIN_ICEBRIDGE=OFF"
69     "-DBUILD_PLUGIN_MATLAB=OFF"
70     "-DBUILD_PLUGIN_MBIO=OFF"
71     "-DBUILD_PLUGIN_MRSID=OFF"
72     "-DBUILD_PLUGIN_NITF=OFF"
73     "-DBUILD_PLUGIN_OCI=OFF"
74     "-DBUILD_PLUGIN_RDBLIB=OFF" # Riegl rdblib is proprietary; not packaged in nixpkgs
75     "-DBUILD_PLUGIN_RIVLIB=OFF"
76   ];
78   meta = with lib; {
79     description = "PDAL is Point Data Abstraction Library. GDAL for point cloud data";
80     homepage = "https://pdal.io";
81     license = licenses.bsd3;
82     maintainers = teams.geospatial.members;
83     platforms = platforms.all;
84   };