Skip to content

Commit 6bd7f7a

Browse files
committed
pull python version from pyproject
1 parent 5443020 commit 6bd7f7a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

flake.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@
2222
config.allowUnfree = true;
2323
};
2424
});
25-
in {
25+
pythonVersion = builtins.replaceStrings
26+
[ "py" ]
27+
[ "python" ]
28+
(nixpkgs.lib.importTOML ./pyproject.toml).tool.ruff.target-version;
29+
in
30+
{
2631
devShells = forEachSupportedSystem ({ pkgs }: {
2732
default = pkgs.mkShell {
2833
packages = with pkgs; [
2934
nodejs
3035
pnpm
31-
python310
36+
pkgs.${pythonVersion}
3237
vsce
3338
pre-commit
3439
];

0 commit comments

Comments
 (0)