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