-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
42 lines (36 loc) · 1.04 KB
/
shell.nix
File metadata and controls
42 lines (36 loc) · 1.04 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
{ pkgs ? import <nixpkgs> {} }:
let
python = pkgs.python312;
in
pkgs.mkShell {
buildInputs = [
python
python.pkgs.pip
python.pkgs.numpy
python.pkgs.pandas
python.pkgs.matplotlib
python.pkgs.pillow
python.pkgs.plotly
# System dependencies
pkgs.gcc
pkgs.zlib
];
shellHook = ''
echo "🌍 Earthquake Dashboard Development Environment"
echo "Python version: $(python --version)"
# Set up pip to install to local directory
export PIP_PREFIX="$PWD/_pip_packages"
export PYTHONPATH="$PIP_PREFIX/lib/python3.12/site-packages:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
# Install packages not available in nixpkgs
if [ ! -f "_pip_packages/.installed" ]; then
echo "Installing additional Python packages..."
mkdir -p "$PIP_PREFIX"
pip install --quiet faicons shiny shinywidgets ridgeplot kagglehub
touch "_pip_packages/.installed"
fi
echo ""
echo "✅ Environment ready!"
echo "Run 'shiny run app.py' to start the dashboard"
'';
}