31 lines
728 B
Nix
31 lines
728 B
Nix
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
pkgs.mkShell
|
|
{
|
|
nativeBuildInputs = with pkgs; [
|
|
python312Packages.flask
|
|
python312Packages.flask-cors
|
|
python312Packages.requests
|
|
python312Packages.pandas
|
|
python312Packages.orjson
|
|
hugo
|
|
tmux
|
|
];
|
|
|
|
shellHook = ''
|
|
${pkgs.cowsay}/bin/cowsay "Welcome to the baseddata.io development environment!" | ${pkgs.lolcat}/bin/lolcat
|
|
|
|
get_session=$(tmux list-session | grep "baseddata")
|
|
|
|
if [ -z "$get_session" ];
|
|
then
|
|
tmux new-session -d -s baseddata
|
|
tmux split-window -h
|
|
tmux send-keys -t 0 "hugo server" C-m
|
|
tmux send-keys -t 1 "cd backend && python app.py" C-m
|
|
echo "Baseddata running in dev tmux shell"
|
|
fi
|
|
'';
|
|
}
|
|
|