aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatasha Moongrave <natasha@256phi.eu>2026-03-24 13:21:38 +0100
committerNatasha Moongrave <natasha@256phi.eu>2026-03-24 13:21:38 +0100
commitdeb3fb7bc45f0a6e56de8183bf9debd69ee1d29c (patch)
tree7a8f1e310712e9ea1a7e78414691e38b44784a3d
parente6568f89791effce5707f7b524c711e381790149 (diff)
Add dev shell flake.nixHEADmaster
-rw-r--r--flake.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..97ff505
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,43 @@
+{
+ description = "Python Text RPG Dungeon Crawler";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = {
+ self,
+ nixpkgs,
+ flake-utils,
+ }:
+ flake-utils.lib.eachDefaultSystem (system: let
+ pkgs = import nixpkgs {inherit system;};
+ python = pkgs.python312;
+
+ pythonEnv = python.withPackages (ps:
+ with ps; [
+ # Dev / QoL
+ ipython
+
+ # Testing
+ pytest
+ pytest-cov
+
+ # Linting & formatting
+ ruff
+ mypy
+ ]);
+ in {
+ devShells.default = pkgs.mkShell {
+ packages = [
+ pythonEnv
+ pkgs.just # optional: task runner (like make)
+ ];
+
+ shellHook = ''
+ echo "🐍 Python $(python --version) — TextRPG env ready"
+ '';
+ };
+ });
+}