Skip to content

Commit

Permalink
install all pythons
Browse files Browse the repository at this point in the history
  • Loading branch information
gotcha committed Sep 25, 2024
1 parent 4311206 commit 0b48e21
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 15 deletions.
38 changes: 37 additions & 1 deletion devenv.lock
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -83,7 +118,7 @@
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
Expand All @@ -105,6 +140,7 @@
},
"root": {
"inputs": {
"all-python": "all-python",
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
Expand Down
10 changes: 8 additions & 2 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
17 changes: 5 additions & 12 deletions devenv.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions tox-uv.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ deps =
coverage
setenv =
COVERAGE_FILE=.coverage.{envname}
allowlist_externals =
uv

[testenv:coverage]
basepython = python3.12
Expand Down

0 comments on commit 0b48e21

Please sign in to comment.