forked from mirrors/nixpkgs
9833d56c24
Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken Tool is still WIP but this is one of the first results. I manually audited the results and removed some results that were not valid. Note that some of these packages maybe should have more constrained platforms set instead of broken set, but I think not being perfectly correct is better than just keep trying to build all these things and never succeeding. Some observations: - Some darwin builds require XCode tools - aarch64-linux builds sometimes suffer from using gcc9 - gcc9 is getting older and misses some new libraries/features - Sometimes tools try to do system detection or expect some explicit settings for platforms that are not x86_64-linux
38 lines
1.3 KiB
Nix
38 lines
1.3 KiB
Nix
{ lib, stdenv, fetchurl, boost, cmake, gdal, libgeotiff, libtiff, LASzip2, fixDarwinDylibNames }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libLAS";
|
|
version = "1.8.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://download.osgeo.org/liblas/libLAS-${version}.tar.bz2";
|
|
sha256 = "0xjfxb3ydvr2258ji3spzyf81g9caap19ql2pk91wiivqsc4mnws";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ] ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
buildInputs = [ boost gdal libgeotiff libtiff LASzip2 ];
|
|
|
|
cmakeFlags = [
|
|
"-DGDAL_CONFIG=${gdal}/bin/gdal-config"
|
|
"-DWITH_LASZIP=ON"
|
|
# 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"
|
|
];
|
|
|
|
postFixup = 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 = "https://liblas.org";
|
|
license = lib.licenses.bsd3;
|
|
platforms = lib.platforms.unix;
|
|
maintainers = [ lib.maintainers.michelk ];
|
|
# never built on aarch64-darwin since first introduction in nixpkgs
|
|
broken = stdenv.isDarwin && stdenv.isAarch64;
|
|
};
|
|
}
|