add devShell for python

This commit is contained in:
Adithya 2023-12-08 13:30:37 +05:30
parent 87f0ffd694
commit c21a84ed0a
Signed by: adtya
GPG key ID: 48FC9915FFD326D0
3 changed files with 14 additions and 0 deletions

View file

@ -9,3 +9,8 @@ This repo contains a bunch of handy dev shells that can used on any system that
- can be activated with `nix develop github:adtya/devshells#go` - can be activated with `nix develop github:adtya/devshells#go`
- can also be activated with direnv by adding `use flake github:adtya/devshells#go` to `.envrc` - can also be activated with direnv by adding `use flake github:adtya/devshells#go` to `.envrc`
### Python
- makes `python3`, `pipenv`, `pyright` and `black` available in path
- can be activated with `nix develop github:adtya/devshells#python`
- can also be activated with direnv by adding `use flake github:adtya/devshells#python` to `.envrc`
- additionally, adding `layout pipenv` to `.envrc` will also activate the pipenv shell based on Pipfile and Pipfile.lock

View file

@ -15,6 +15,7 @@
{ {
devShells = { devShells = {
go = import ./go.nix { inherit pkgs; }; go = import ./go.nix { inherit pkgs; };
python = import ./python.nix { inherit pkgs; };
}; };
} }
); );

8
python.nix Normal file
View file

@ -0,0 +1,8 @@
{ pkgs }: pkgs.mkShell {
packages = with pkgs; [
python3
python3Packages.black
nodePackages_latest.pyright
pipenv
];
}