Files
ad-nix/shell.nix
John Lancaster afbc973248 started flakes
2024-12-04 22:03:18 -06:00

38 lines
938 B
Nix

{ pkgs ? import <nixpkgs> {}, unstable ? import <nixpkgs-unstable> {} }:
pkgs.mkShell {
packages = [
pkgs.git
(pkgs.python312.withPackages (python-pkgs: with python-pkgs; [
pip
setuptools
wheel
# pyproject deps
aiohttp
astral
bcrypt
deepdiff
feedparser
iso8601
paho-mqtt
requests
uvloop
pydantic
click
]))
];
shellHook = ''
echo "Welcome to the Nix shell for AppDaemon development"
cd /usr/src/app
echo "URL: $(git config --get remote.origin.url)"
echo "Branch: $(git rev-parse --abbrev-ref HEAD)"
echo "Hash: $(git rev-parse --short HEAD)"
alias build="uv run python -m build"
alias dbuild="docker build -t acockburn/appdaemon:local-dev /usr/src/app"
alias fbuild="build && dbuild"
alias clean="cd /usr/src/app && rm -rf ./build ./dist"
alias ad="python -m appdaemon"
'';
}