Skip to content

Instantly share code, notes, and snippets.

@zeta-00
Created November 7, 2021 02:04
Show Gist options
  • Save zeta-00/230a17e34ba5a35388cf91d48341d1a1 to your computer and use it in GitHub Desktop.
Save zeta-00/230a17e34ba5a35388cf91d48341d1a1 to your computer and use it in GitHub Desktop.
Trying to get poetry working with nix:
# Paste in terminal:
# echo "use nix" >> .envrc
# direnv allow
# direnv deny (to disable direnv)
{ pkgs ? import <nixpkgs> {} }:
let
pythonEnv = pkgs.python38.withPackages (ps: with ps;
[
numpy
matplotlib
toolz
# pandas
# ipython for interactive computing:
# jupyter
# jupyter_client
# jupyter_console
ipython
ipykernel
ipywidgets
widgetsnbextension
ipyparallel
pkgs.nbstripout
nbmerge
# vega
# python autocompletion tool:
jedi
epc
# python-language-server installation:
python-language-server
# extra plugins for python-lsp:
pyls-mypy
# pyls-isort
pyls-black
rope
pyflakes
mccabe
pycodestyle
pydocstyle
autopep8
yapf
]);
in
with pkgs;
mkShell
{
nativeBuildInputs = with pkgs;
[
pythonEnv
# python dependency management and packaging tool:
python38Packages.poetry
# atom text editor:
# atom
# required for nix-direnv:
bashInteractive
];
shellHook =
''
export EDITOR=emacs;
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment