blob: 4255a12dbab2a1d085536a3ca568253137d83250 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
{ lib
, stdenv
, fetchFromGitHub
, cmake
, boost
, tbb
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "PotreeConverter";
version = "unstable-2022-08-04";
src = fetchFromGitHub {
owner = "potree";
repo = "PotreeConverter";
rev = "758bbac98a662de5e57d2280675e11cc76241688";
sha256 = "sha256-pDdV2/edYhhBWs153hSy1evI3cXD0Xq9nrEsw3JNcH4=";
};
buildInputs = [
boost
tbb
];
nativeBuildInputs = [
makeWrapper
cmake
];
patchPhase = ''
substituteInPlace ./CMakeLists.txt \
--replace "find_package(TBB REQUIRED)" ""
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
mv liblaszip.so $out/lib
mv PotreeConverter $out/bin
ln -s $out/bin/PotreeConverter $out/bin/potreeconverter
# Create an empty wrapper, since PotreeConverter segfaults if called via
# $PATH rather than absolute path. An empty wrapper forces an absolute path
# on each invocation
wrapProgram $out/bin/PotreeConverter
runHook postInstall
'';
fixupPhase = ''
runHook preFixup
ln -s $src/resources $out/bin/resources
runHook postFixup
'';
meta = with lib; {
description = "Create multi res point cloud to use with potree";
homepage = "https://github.com/potree/PotreeConverter";
license = licenses.bsd2;
maintainers = with maintainers; [ matthewcroughan ];
platforms = with platforms; linux;
};
}
|