-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
59 lines (55 loc) · 1.86 KB
/
Copy pathflake.nix
File metadata and controls
59 lines (55 loc) · 1.86 KB
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
{
description = "Nix project environment with clang, cmake and tooling";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system);
in
{
devShells = forAllSystems
(system:
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
in
{
# For nvcc---if you want to use CUDA
# default = with pkgs; mkShell.override { stdenv = gcc12Stdenv; }
# For gcc---if you do not want to use CUDA
default = with pkgs; mkShell.override { stdenv = gcc13Stdenv; }
{
shellHook = ''
export CUDA_PATH=${cudatoolkit}
export LD_LIBRARY_PATH=${linuxPackages.nvidia_x11}/lib:${ncurses5}/lib
export EXTRA_LDFLAGS="-L/lib -L${linuxPackages.nvidia_x11}/lib -L${gcc13.cc.lib}/lib"
export EXTRA_CCFLAGS="-I/usr/include"
export NVCC_APPEND_FLAGS="-L${gcc13.cc.lib}/lib"
export HTLSIB_ROOT=${htslib}
'';
packages = [
clang-tools
bear
cmake
cmake-format
pkg-config
];
buildInputs = [
cudatoolkit linuxPackages.nvidia_x11
ncurses5 binutils
boost htslib
# or-tools
or-tools
bzip2 cbc eigen glpk python3.pkgs.absl-py
python3.pkgs.pybind11 python3.pkgs.setuptools
python3.pkgs.wheel re2 zlib
];
};
}
);
};
}