-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathflake.nix
More file actions
63 lines (57 loc) · 1.13 KB
/
flake.nix
File metadata and controls
63 lines (57 loc) · 1.13 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
60
61
62
63
{
description = "Python environment using micromamba";
inputs = {
utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
utils,
...
}:
utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
webct = pkgs.buildFHSUserEnv {
name = "webct";
targetPkgs = pkgs: with pkgs; [
micromamba
just
fish
vscode
# gvxr
libGL
libGLU
xorg.libX11
# open3d (mesh decimation)
libudev-zero
# frontend
nodejs_22
];
# runScript=''
extraBuildCommands = ''
# link micromamba to 'conda' in .mamba
# ln -s ${pkgs.micromamba}/bin/micromamba conda
'';
# https://nixos.org/manual/nixpkgs/unstable/
profile = ''
export PATH=${pkgs.vscode.fhs}/bin:".":$PATH
export MAMBA_ROOT_PREFIX=./.mamba
eval "$(micromamba shell hook --shell=posix)"
if [ ! -d $MAMBA_ROOT_PREFIX ]; then
micromamba create -f environment.yml -y
fi
micromamba activate webct
'';
};
in {
devShells.default = pkgs.mkShell {
buildInputs = [
webct
];
shellHook = ''webct'';
};
});
}