Rearrange flake.nix to call mkPoetryEnv directly instead of with mkShell

This commit is contained in:
Jacob Hinkle 2022-09-30 20:13:49 -04:00
parent 1fd60cc4f7
commit 25ab58bcda

View File

@ -26,32 +26,26 @@
python = pkgs.python310; python = pkgs.python310;
in in
{ {
#apps = {
#nancy = pkgs.nancy;
#};
#defaultApp = pkgs.nancy;
defaultPackage = pkgs.nancy; defaultPackage = pkgs.nancy;
devShell =
devShell = pkgs.mkShell { let
buildInputs = with pkgs; with python.pkgs; [ e = pkgs.poetry2nix.mkPoetryEnv {
nixpkgs-fmt
black
poetry
pkgs.pre-commit
sqlite
(pkgs.poetry2nix.mkPoetryEnv {
inherit python; inherit python;
projectDir = ./.; projectDir = ./.;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
editablePackageSources = { editablePackageSources = {
nancy = ./src; nancy = ./src;
}; };
}) };
]; in
shellHook = "echo 'Execute `poetry shell` to access an environment with an editable install.'"; e.env.overrideAttrs (oldAttrs: {
}; buildInputs = with pkgs; with python.pkgs; [
nixpkgs-fmt
black
poetry
pkgs.pre-commit
sqlite
];
});
})); }));
} }