Open steinerkelvin opened 1 year ago
Ok, just realized that touching a README.md
solves it. I guess we should add a README.md
to the template.
Aside from a README, I have other issues straight out of the box:
$ pushd $(mktemp -d)
$ nix flake init --template github:nix-community/poetry2nix
wrote: /private/var/folders/tc/rq67x3pj0l3_8wp74fv_4vl80000gn/T/tmp.1UisMXt6/app/__init__.py
wrote: /private/var/folders/tc/rq67x3pj0l3_8wp74fv_4vl80000gn/T/tmp.1UisMXt6/app
wrote: /private/var/folders/tc/rq67x3pj0l3_8wp74fv_4vl80000gn/T/tmp.1UisMXt6/pyproject.toml
wrote: /private/var/folders/tc/rq67x3pj0l3_8wp74fv_4vl80000gn/T/tmp.1UisMXt6/flake.nix
wrote: /private/var/folders/tc/rq67x3pj0l3_8wp74fv_4vl80000gn/T/tmp.1UisMXt6/poetry.lock
$ nix develop
warning: creating lock file '/private/var/folders/tc/rq67x3pj0l3_8wp74fv_4vl80000gn/T/tmp.1UisMXt6/flake.lock'
error: builder for '/nix/store/6rr9j6abzkk86fvdbvaqq0y0xy7ln7fa-python3.11-poetry-1.7.1.drv' failed with exit code 1;
last 10 log lines:
> OK
> /private/tmp/nix-build-python3.11-poetry-1.7.1.drv-0/source
> Finished executing pypaBuildPhase
> buildPhase completed in 36 seconds
> Running phase: pythonRuntimeDepsCheckHook
> Executing pythonRuntimeDepsCheck
> Checking runtime dependencies for poetry-1.7.1-py3-none-any.whl
> - fastjsonschema not installed
> - platformdirs<4.0.0,>=3.0.0 not satisfied by version 4.0.0
> - xattr<0.11.0,>=0.10.0 not satisfied by version 1.0.0
For full logs, run 'nix log /nix/store/6rr9j6abzkk86fvdbvaqq0y0xy7ln7fa-python3.11-poetry-1.7.1.drv'.
error: 1 dependencies of derivation '/nix/store/6j24d8gdhb8nqm1p2snyqa39qpdjzrkq-nix-shell-env.drv' failed to build
@ches This obviously isn't a proper fix, but I just ran into this same problem and found that pinning nixpkgs to 23.11
instead of unstable made my devshell build properly
Note the timestamps, above. First there was activity in November, and then there was three of us here within 12 hours. I think there was a recent change that made this suddenly more relevant. Personally, I'm here because I'm running into the error that @ches has shared above (xattr<0.11.0,>=0.10.0 not satisfied by version 1.0.0
)
Indeed, the addition of the pythonRuntimeDepsCheck
hook was merged to nixpkgs master around Dec. 20th:
https://github.com/NixOS/nixpkgs/commit/8f3162f83fcccf26bf50c55ff960fd2dee5264b2
Not in a stable release yet as of now, hence @ciarandg's observation for pinning stable.
The old behavior can be restored by adding dontCheckRuntimeDeps = true
to your derivation, disabling the check. This might be indicative of an underlying issue, though, so it's a temporary fix.
More details at NixOS/nixpkgs#250865. This went in with the last staging merge, which was three days ago.
FWIW: For Poetry fastjsonschema and platformdirs dep checks now fixed on nixpkgs master:
https://github.com/NixOS/nixpkgs/issues/281034#issuecomment-1891113369
xattr still seems overlooked as a Darwin-specific dependency.
Anyway we can probably conclude that these issues are upstream, and scope this issue back down to the OP's suggestion: include a dummy README.md
in the template, or perhaps the problem can be avoided by removing readme = "README.md"
from the generated pyproject.toml
.
Apologies for the detour.
Describe the issue
Getting the template with
then running:
gets me the following error:
Additional context
flake.nix
:pyproject.toml
:poetry.lock
: