bidict/flake.nix

40 lines
1.0 KiB
Nix
Raw Normal View History

{
description = "bidict";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
2024-06-25 00:43:24 +00:00
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
2024-06-25 00:43:24 +00:00
flake-utils.lib.eachDefaultSystem (system:
let
2024-06-25 00:43:24 +00:00
pkgs = import nixpkgs { inherit system; };
in {
devShell = pkgs.mkShell {
packages = with pkgs; [
pre-commit
python313
2024-06-25 00:43:24 +00:00
python312
python311
python310
python39
pypy310
pypy39
uv # bootstrap uv version
2024-06-25 00:43:24 +00:00
];
shellHook = ''
source ./dev-deps/dev.env
if test -e "$VENV_SUBDIR"; then
echo "* Using pre-existing development virtualenv dir ($VENV_SUBDIR)"
else
echo "* No pre-existing development virtualenv dir ($VENV_SUBDIR), initializing..."
./init_dev_env
fi
source "$VENV_SUBDIR/bin/activate"
echo "* Activated development virtualenv ($VENV_SUBDIR)"
'';
};
});
}