10 stdenv.mkDerivation rec {
11 pname = "PotreeConverter";
12 version = "unstable-2023-02-27";
14 src = fetchFromGitHub {
16 repo = "PotreeConverter";
17 rev = "af4666fa1090983d8ce7c11dcf49ba19eda90995";
18 sha256 = "sha256-QYNY+/v6mBEJFiv3i2QS+zqkgWJqeqXSqNoh+ChAiQA=";
34 substituteInPlace ./CMakeLists.txt \
35 --replace "find_package(TBB REQUIRED)" ""
37 # prevent inheriting permissions from /nix/store when copying
38 substituteInPlace Converter/src/main.cpp --replace \
39 'fs::copy(templateDir, pagedir, fs::copy_options::overwrite_existing | fs::copy_options::recursive)' 'string cmd = "cp --no-preserve=mode -r " + templateDir + " " + pagedir; system(cmd.c_str());'
42 # The upstream build system does not provide an install target.
46 mkdir -p $out/{bin,lib}
47 mv liblaszip.so $out/lib
48 mv PotreeConverter $out/bin
49 ln -s $out/bin/PotreeConverter $out/bin/potreeconverter
51 # Create an empty wrapper, since PotreeConverter segfaults if called via
52 # $PATH rather than absolute path. An empty wrapper forces an absolute path
54 wrapProgram $out/bin/PotreeConverter
60 ln -s $src/resources $out/bin/resources
64 description = "Create multi res point cloud to use with potree";
65 homepage = "https://github.com/potree/PotreeConverter";
66 license = licenses.bsd2;
67 maintainers = with maintainers; [ matthewcroughan ];
68 platforms = with platforms; linux;