Created
June 24, 2020 20:14
-
-
Save mtrsk/88fdb6f88502607262ae02f181861037 to your computer and use it in GitHub Desktop.
Multiple Python versions with poetry2nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
makeEnv = python: pkgs.poetry2nix.mkPoetryEnv { | |
python = python; | |
pyproject = ./pyproject.toml; | |
poetrylock = ./poetry.lock; | |
overrides = [ | |
pkgs.poetry2nix.defaultPoetryOverrides | |
(self: super: { | |
# overridding python-box | |
python-box = super.python-box.overridePythonAttrs(old: { | |
buildInputs = old.buildInputs ++ [ | |
self.pytestrunner | |
]; | |
}); | |
}) | |
]; | |
}; | |
in | |
{ | |
py38 = makeEnv pkgs.python38; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run: