diff --git a/devenv.lock b/devenv.lock index 0b688ac..7dcef3a 100644 --- a/devenv.lock +++ b/devenv.lock @@ -1,5 +1,25 @@ { "nodes": { + "all-python": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722978926, + "owner": "cachix", + "repo": "nixpkgs-python", + "rev": "7c550bca7e6cf95898e32eb2173efe7ebb447460", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "nixpkgs-python", + "type": "github" + } + }, "devenv": { "locked": { "dir": "src/modules", @@ -31,6 +51,21 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -83,7 +118,7 @@ }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "gitignore": "gitignore", "nixpkgs": [ "nixpkgs" @@ -105,6 +140,7 @@ }, "root": { "inputs": { + "all-python": "all-python", "devenv": "devenv", "nixpkgs": "nixpkgs", "pre-commit-hooks": "pre-commit-hooks" diff --git a/devenv.nix b/devenv.nix index c3a5e07..32eba7e 100644 --- a/devenv.nix +++ b/devenv.nix @@ -1,11 +1,17 @@ { pkgs, lib, config, inputs, ... }: -{ +let + system = pkgs.stdenv.system; + python38 = inputs.all-python.packages.${system}."3.8"; + python39 = inputs.all-python.packages.${system}."3.9"; + python310 = inputs.all-python.packages.${system}."3.10"; + python312 = inputs.all-python.packages.${system}."3.12"; +in { # https://devenv.sh/basics/ env.GREET = "devenv"; # https://devenv.sh/packages/ - packages = [ pkgs.git pkgs.just pkgs.libffi]; + packages = [ pkgs.git pkgs.just pkgs.libffi python38 python39 python310 python312 pkgs.uv]; # https://devenv.sh/languages/ languages.python.enable = true; diff --git a/devenv.yaml b/devenv.yaml index 116a2ad..05b4bcc 100644 --- a/devenv.yaml +++ b/devenv.yaml @@ -1,15 +1,8 @@ -# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json inputs: nixpkgs: url: github:cachix/devenv-nixpkgs/rolling - -# If you're using non-OSS software, you can set allowUnfree to true. -# allowUnfree: true - -# If you're willing to use a package that's vulnerable -# permittedInsecurePackages: -# - "openssl-1.1.1w" - -# If you have more than one devenv you can merge them -#imports: -# - ./backend + all-python: + url: github:cachix/nixpkgs-python + inputs: + nixpkgs: + follows: nixpkgs diff --git a/tox-uv.ini b/tox-uv.ini index 06e1430..ccaf676 100644 --- a/tox-uv.ini +++ b/tox-uv.ini @@ -23,6 +23,8 @@ deps = coverage setenv = COVERAGE_FILE=.coverage.{envname} +allowlist_externals = + uv [testenv:coverage] basepython = python3.12