Hi guys, I need to add my PyPI package to the system packages.
I built it with poetry it doesn’t have setup.py only pyproject.toml
I tried to test build but it fails
# default.nix
with import <nixpkgs> {};
with python39Packages;
buildPythonPackage rec {
pname = "base16_colorlib";
format = "pyproject";
version = "0.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "f0e0eeb50e8f9af1a00950577f6178febcf80ab2bf9bad937f9fe8068936432c";
};
doCheck = false;
BuildInputs = [ poetry ]; # or poetry-core doesn't matter
}
I can’t figure out how to tell the builder the correct build inputs
nix-build
If I specify poetry
error: poetry was promoted to a top-level attribute, use poetry-core to build Python packages
(use '--show-trace' to show detailed location information)
If I specify poetry-core
error: builder for '/nix/store/a3dl57jqvz2zwbl10rx0lgg177gknjyq-python3.9-base16_colorlib-0.2.0.drv' failed with exit code 2;
last 10 log lines:
> File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
> File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
> File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
> File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
> File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'poetry'
I’m not much confused, and I seem to lack knowledge (
I tried to find the right solution but I haven’t found it yet
There are two issue:
one
two
but they do not have examples suitable for my case, as well as in the manual