5 Jul 2024 |
| ma27 joined the room. | 18:32:39 |
| Sami Liedes joined the room. | 23:02:15 |
8 Jul 2024 |
| axgxpxyxix joined the room. | 13:34:35 |
9 Jul 2024 |
FRidh | It would be great if this PR could be merged adding a cargo hash https://github.com/nix-community/poetry2nix/pull/1726 | 09:10:13 |
truh | I'm trying to investigate why opencv is no longer building (probably the same as https://github.com/nix-community/poetry2nix/issues/1715).
Do the opencv packages in poetry2nix rely on the instructions from https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/opencv/4.x.nix ? | 10:37:52 |
10 Jul 2024 |
TyberiusPrime (smilodon inopinatus) | In reply to @FRidh:matrix.org It would be great if this PR could be merged adding a cargo hash https://github.com/nix-community/poetry2nix/pull/1726 my work in progress giant PR should fix that 'en passant' | 10:02:48 |
TyberiusPrime (smilodon inopinatus) | In reply to @truh:matrix.org I'm trying to investigate why opencv is no longer building (probably the same as https://github.com/nix-community/poetry2nix/issues/1715).
Do the opencv packages in poetry2nix rely on the instructions from https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/opencv/4.x.nix ? I don't think they do, reading the source. | 10:04:08 |
TyberiusPrime (smilodon inopinatus) | and once again, my mega-PR fixes that as well. | 10:04:39 |
TyberiusPrime (smilodon inopinatus) | by doing
postPatch = ''
sed -i pyproject.toml -e 's/numpy==[0-9]\+\.[0-9]\+\.[0-9]\+;/numpy;/g'
# somehow the type information doesn't get build
substituteInPlace setup.py --replace-fail '[ r"python/cv2/py.typed" ] if sys.version_info >= (3, 6) else []' "[]" \
--replace-fail 'rearrange_cmake_output_data["cv2.typing"] = ["python/cv2" + r"/typing/.*\.py"]' "pass"
'';
| 10:04:57 |
TyberiusPrime (smilodon inopinatus) | (basically, by saying to not build the py.typed file) | 10:05:14 |
truh | My current workaround is p2n.defaultPoetryOverrides.extend (self: super: { opencv-contrib-python = super.opencv4; }) & dontCheckRuntimeDeps = true; but your patch thing looks more reasonable | 10:07:42 |
truh | Honestly feels like a bit of a waste not to use all those handcrafted build expressions in nixpkgs, I guess those only need to work with specific versions so maybe more problems than gain by using them. | 10:09:48 |
TyberiusPrime (smilodon inopinatus) | yeah, I've been at least stealing the patches from nixpkgs, but you're right, they only need to work with one exact version | 10:11:05 |
truh | I somewhat surprised opencv-python ever worked without the nixpkgs stuff, given that they download stuff during the cmake build | 10:11:12 |
TyberiusPrime (smilodon inopinatus) | In reply to @truh:matrix.org I somewhat surprised opencv-python ever worked without the nixpkgs stuff, given that they download stuff during the cmake build I can't comment on that, since I have no clue about opencv or it's build process. I just went and tried to fix as many packages as possible | 10:11:50 |
TyberiusPrime (smilodon inopinatus) | (and my test 'matrix' is already bonkers... I try to build 17k python packages, each individually locked by poetry, and that ends up being >100k package*version builds.) | 10:12:55 |
TyberiusPrime (smilodon inopinatus) | (my nixpkgs copy doesn't seem to have opencv-python at al. or maybe not in python-modules at least) | 10:13:34 |
truh |  Download Screenshot 2024-04-29 at 17.14.15.png | 10:13:54 |
truh | python3Packages.opencv4 is https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/opencv/4.x.nix | 10:14:42 |
TyberiusPrime (smilodon inopinatus) | no I do it because I've failed my will power check and now I have a brain bug that says 'must build more packagesssss' | 10:14:47 |
TyberiusPrime (smilodon inopinatus) | but I'll get this PR landed, and then I'll have a look at whether or not poetry2nix is actually reading the build-systems from pyproject.toml ^^ | 10:15:51 |
TyberiusPrime (smilodon inopinatus) | but I really wanted it to got from 41% build packages to 82%... I'm only at 80% | 10:16:29 |
truh | no more manual overrides for setuptools, etc? | 10:16:30 |
TyberiusPrime (smilodon inopinatus) | the PR started with 'hey, we can just add setuptools if we see a setup.py but no pyproject.toml', and then we can get rid of half of these build-overrides | 10:16:55 |
TyberiusPrime (smilodon inopinatus) | then I defined some largish package sets of 'important' python packages | 10:17:21 |
TyberiusPrime (smilodon inopinatus) | tried building every single one of them | 10:17:32 |
truh | I thought that couldn't be done because poetry2nix would need this info to be in the poetry.lock of the main project | 10:17:47 |
TyberiusPrime (smilodon inopinatus) | and found that poetry2nix can only do 41% of them. | 10:17:52 |
TyberiusPrime (smilodon inopinatus) | In reply to @truh:matrix.org I thought that couldn't be done because poetry2nix would need this info to be in the poetry.lock of the main project well, nobody told me. I just went down to where the actual package is being build, and said 'nix, look into the $src' | 10:18:38 |
TyberiusPrime (smilodon inopinatus) | so after all the resolution of 'what version we need' has been done. | 10:18:57 |