From c21a84ed0a678c5b4a0729eb5c75c350b2e7f299 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Fri, 8 Dec 2023 13:30:37 +0530 Subject: [PATCH] add devShell for python --- README.md | 5 +++++ flake.nix | 1 + python.nix | 8 ++++++++ 3 files changed, 14 insertions(+) create mode 100644 python.nix diff --git a/README.md b/README.md index 4021027..bc6f846 100644 --- a/README.md +++ b/README.md @@ -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 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 diff --git a/flake.nix b/flake.nix index 09aba1f..80441ef 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ { devShells = { go = import ./go.nix { inherit pkgs; }; + python = import ./python.nix { inherit pkgs; }; }; } ); diff --git a/python.nix b/python.nix new file mode 100644 index 0000000..6c4c117 --- /dev/null +++ b/python.nix @@ -0,0 +1,8 @@ +{ pkgs }: pkgs.mkShell { + packages = with pkgs; [ + python3 + python3Packages.black + nodePackages_latest.pyright + pipenv + ]; +}