-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathshell.nix
93 lines (76 loc) · 2.1 KB
/
shell.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
let
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-24.05";
# nixpkgs overlay for OpenCV contrib
overlay-for-opencv-contrib = self: super: {
opencv = super.opencv.override {
enableContrib = true;
enableFfmpeg = true;
enableGtk3 = true;
enableIpp = true;
enableUnfree = true;
enableCuda = true;
enableCudnn = true;
};
};
# inxpkgs overlay for PCL with cuda
overlay-for-pcl-cuda = self: super: {
pcl = super.pcl.override {
cudaSupport = true;
};
};
# Fetch the specific version of nixpkgs you need
oldNixpkgs = import (fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/27ba408bba01511329810cf02697c26f86bf0342.zip";
}) {};
embree3 = oldNixpkgs.embree;
pkgs = import nixpkgs { config = { allowUnfree = true; }; overlays = [ overlay-for-opencv-contrib overlay-for-pcl-cuda]; };
in
# Define the environment using stdenv.mkDerivation
pkgs.stdenv.mkDerivation {
name = "reuseExplorer-env";
nativeBuildInputs = [
pkgs.cmake
#pkgs.ninja
pkgs.pkg-config
#pkgs.python3
#pkgs.wrapQtAppsHook
];
# Add dependencies here
buildInputs = [
pkgs.gcc # C++ compiler
# pkgs.cmake # CMake build tool (if using CMake)
pkgs.boost # Boost library (example dependency)
# pkgs.pkg-config # Pkg-config for library detection
# Project dependencies
pkgs.pcl
pkgs.boost
pkgs.flann
pkgs.vtk
pkgs.qhull
pkgs.opencv
pkgs.cgal
embree3
pkgs.eigen
pkgs.gurobi
pkgs.scip
pkgs.tbb
pkgs.python312Packages.pybind11
pkgs.cudaPackages.cudnn_8_9
pkgs.cudaPackages.cudatoolkit
pkgs.mpi
pkgs.mpfr
pkgs.libusb1
];
shellHook = ''
echo "This is the reuseExplorer dev shell!"
'';
}
## Expose the derivation to nix-shell
#pkgs.mkShell {
# buildInputs = [ reuseExplorerEnv ];
#
# # Set up environment variables if necessary
# shellHook = ''
# echo "This is the reuseExplorer dev shell!"
# '';
#}