-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
70 lines (62 loc) · 1.62 KB
/
default.nix
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
64
65
66
67
68
69
70
{ stdenv, lib, buildPythonPackage, fetchPypi, scipy, scikitlearn, numpy
, matplotlib, ipywidgets, plyfile, pandas, pyyaml, tqdm, tree, unzip, zip
, autoPatchelfHook, pytorchWithCuda, libtensorflow-bin, libusb, cudaPackages
, libGL }:
let
addict = buildPythonPackage {
pname = "addict";
version = "2.4.0";
src = fetchPypi {
pname = "addict";
version = "2.4.0";
sha256 = "1574sicy5ydx9pvva3lbx8qp56z9jbdwbj26aqgjhyh61q723cmk";
};
};
in buildPythonPackage rec {
pname = "open3d";
version = "0.13.0";
format = "wheel";
src = fetchPypi {
inherit pname version format;
dist = "cp38";
python = "cp38";
abi = "cp38";
platform = "manylinux2014_x86_64";
sha256 = "sha256:1526gvfrnvxfla5ji2rhjgdqq20h1i68v5673lssh087y2pdh8ys";
};
# sklearn dependency does not exist ofc... Why can't people
# package their shit normally. This tilts me so much.
patchPhase = ''
${unzip}/bin/unzip ./dist/open3d-0.12.0-cp37-cp37m-manylinux2014_x86_64.whl -d tmp
rm ./dist/open3d-0.12.0-cp37-cp37m-manylinux2014_x86_64.whl
sed -i 's/sklearn/scikit-learn/g' tmp/open3d-0.12.0.dist-info/METADATA
cd tmp
${zip}/bin/zip -0 -r ../dist/open3d-0.12.0-cp37-cp37m-manylinux2014_x86_64.whl ./*
cd ../
'';
nativeBuildInputs = [
autoPatchelfHook
];
buildInputs = [
# so deps
stdenv.cc.cc.lib
libusb.out
pytorchWithCuda
libtensorflow-bin
cudaPackages.cudatoolkit_10_1.lib
libGL
];
propagatedBuildInputs = [
# py deps
ipywidgets
tqdm
pyyaml
pandas
plyfile
scipy
scikitlearn
numpy
addict
matplotlib
];
}