-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
53 lines (45 loc) · 1.44 KB
/
flake.nix
File metadata and controls
53 lines (45 loc) · 1.44 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
{
description = "VIPER development environment with Python, HDF5, and serial comms";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/25.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
pythonEnv = pkgs.python313.withPackages (ps: with ps; [
h5py
numpy
pandas
matplotlib
pyserial
pytest_7
]);
in {
devShells.default = pkgs.mkShell {
name = "viper-dev-shell";
buildInputs = [
pythonEnv
pkgs.hdf5
pkgs.clang-tools
];
shellHook = ''
export VIPER_DIR="$(pwd)"
export PATH="$VIPER_DIR/bin:$PATH"
echo "======================================"
echo "VIPER Development Environment Activated"
echo "--------------------------------------"
echo "VIPER_DIR: $VIPER_DIR"
echo "Python: $(python3 --version)"
echo "--------------------------------------"
if [ -f "$VIPER_DIR/assets/VIPER.txt" ]; then
cat "$VIPER_DIR/assets/VIPER.txt"
fi
echo "Type 'viper <gauge.conf> <recording.conf>' to run."
echo "======================================"
'';
};
}
);
}