~ruther/nixos-config

ref: 468bbde3fd20b533f1d2905d6a9752df05027103 nixos-config/shells/python.nix -rw-r--r-- 535 bytes
468bbde3 — Frantisek Bohacek feat: add luks to laptop configuration 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
  packages = with pkgs; [
    (pkgs.python3.withPackages (ps: [
      ps.pip
      ps.tkinter
    ]))
    python-language-server
    poetry # Instead of pip, you can use $ poetry init -n --name <name> and $ poetry add request <package> to install python packages
  ];
  shellHook = ''
    export PIP_PREFIX=$(pwd)/_build/pip_packages
    export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
    export PATH="$PIP_PREFIX/bin:$PATH"
    unset SOURCE_DATE_EPOCH
  '';
}
Do not follow this link