Open jtara1 opened 1 month ago
This issue shouldn't be a problem w/ poetry2nix after trying setuptools and mkDerivation, getting error
error: builder for '/nix/store/idigng0xk0smjcb8c6jpxggyg0b5advn-python3.11-send-mail-1.0.2.drv' failed with exit code 2;
last 10 log lines:
> File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
> File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
> File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
> File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'setuptools'
>
>
For full logs, run 'nix log /nix/store/idigng0xk0smjcb8c6jpxggyg0b5advn-python3.11-send-mail-1.0.2.drv'.
Hi :),
adding poetry-core as a build input in an override worked for me (hiroplotutils
is the git dependency)
packages = {
loopBath = poetry2nix.mkPoetryApplication {
projectDir = self;
preferWheels = true;
overrides = poetry2nix.overrides.withDefaults (final: prev: {
hiroplotutils = prev.hiroplotutils.overridePythonAttrs
(
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ prev.poetry-core ];
}
);
matplotlib = with pkgs; prev.matplotlib.override (
{
enableGtk3 = true;
}
);
});
};
default = self.packages.${system}.loopBath;
};
Describe the issue
If I
poetry add git+https://github.com/jtara1/send_mail.git@f4715883cfe4e605b4809b51da8bdf75e774ab32
in a project flake then build this as a nix derivation using poetry2nix, I'm getting an error when trying to build the project flake nixosModules deps.Is this test case, git dep, covered in this repos
tests/
?I had other several other deps like flask, flask-cors, etc that I had
poetry add
ed and it was building fine.