Comments (7)
@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
from poetry2nix.
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
flake.lock
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1698974481,
"narHash": "sha256-yPncV9Ohdz1zPZxYHQf47S8S0VrnhV7nNhCawY46hDA=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "4bb5e752616262457bc7ca5882192a564c0472d2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1705133751,
"narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9b19f5e77dd906cb52dade0b7bd280339d2a1f3d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_3",
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1705060653,
"narHash": "sha256-puYyylgrBS4AFAHeyVRTjTUVD8DZdecJfymWJe7H438=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "e0b44e9e2d3aa855d1dd77b06f067cd0e0c3860d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"poetry2nix": "poetry2nix"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"id": "systems",
"type": "indirect"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1699786194,
"narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
from poetry2nix.
Indeed, the addition of the pythonRuntimeDepsCheck
hook was merged to nixpkgs master around Dec. 20th:
Not in a stable release yet as of now, hence @ciarandg's observation for pinning stable.
from poetry2nix.
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.
from poetry2nix.
FWIW: For Poetry fastjsonschema and platformdirs dep checks now fixed on nixpkgs master:
NixOS/nixpkgs#281034 (comment)
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.
from poetry2nix.
Ok, just realized that touching a README.md
solves it. I guess we should add a README.md
to the template.
from poetry2nix.
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
)
from poetry2nix.
Related Issues (20)
- poethepoet ruff task not found in poetry2nix devShell
- Unable to fetch wheel from PyTorch geometric
- template fails with stack overflow HOT 2
- Default dependencies should work as if they were in `main` group
- Built poetry apps / envs contain `__pycache__` and `*.pyc` HOT 1
- pyee no longer contains setup.py; installation fails for recent versions HOT 1
- overrides for package torchvision is missing native build dependencies.
- Automatically add `setuptools` to `buildInputs` for legacy projects
- scipy v1.13 requires cython 3
- Python package not selected due to darwinSdkVersion mismatch on M1 Mac HOT 1
- awscli2 package breaks cryptography when used with non-default Python version
- [bug] platform_machine reported wrong on Arm machines lead to Missing suitable source/wheel file entry errors HOT 3
- Separation of build & runtime dependencies? HOT 1
- Can't install cmdstanpy wheel
- Can't install python-magic wheel HOT 1
- Flake with multiple dev shells, mkPoetryEnv is one of them
- Pyright preferring some other python over poetry2nix's
- `editablePackageSources` doesn't work for packages in a `src` directory
- "Error compiling Cython file" in pyproj 3.5.0
- badge showing "CI: failing", probably wrongly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poetry2nix.