beautysh uses the following devShell:
devShell =
let
beautysh = pkgs.poetry2nix.mkPoetryEnv {
python = pkgs.${pyLatest};
projectDir = ./.;
editablePackageSources.beautysh = ./beautysh;
};
in
beautysh.env.overrideAttrs (old: {
nativeBuildInputs = with pkgs; old.nativeBuildInputs ++ [
nixpkgs-fmt
poetry
];
});
});
How does this differ from the implementation I see normally like the following:
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
nixpkgs-fmt
poetry
(pkgs.poetry2nix.mkPoetryEnv {
inherit python;
projectDir = ./.;
editablePackageSources = {
my-app = ./src;
};
})
];
};
What is the advantage of overrideAttrs
of the mkPoetryEnv
instead of using mkShell
?