!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

330 Members
https://github.com/nix-community/poetry2nix62 Servers

Load older messages


SenderMessageTime
20 Mar 2022
@worldofgeese:one.ems.hostworldofgeese* I swapped `hy = { git = "https://github.com/hylang/hy.git", python = ">=3.9,<3.11" }` for `hy = {version = "1.0a4", allow-prereleases = true, python = ">=3.9,<3.11"}`, did a `poetry update` and now `mkPoetryEnv` returns Hy 1.04a, which is the latest pre-release. It would be nice to get the tip of the master branch but this works fine for my purposes now21:54:44
21 Mar 2022
@tompurl:destrocodpiece.wtfTom Purl (he/him)
In reply to @worldofgeese:one.ems.host
I swapped hy = { git = "https://github.com/hylang/hy.git", python = ">=3.9,<3.11" } for hy = {version = "1.0a4", allow-prereleases = true, python = ">=3.9,<3.11"}, did a poetry update and now mkPoetryEnv returns Hy 1.04a, which is the latest pre-release. It would be nice to get the tip of the master branch but this works fine for my purposes now
Thank you for sharing your solution.
00:20:28
22 Mar 2022
@sephi:matrix.orgsephi Is there a way to use the environment of a derivation to add more files to it right before the Python package is created? I’m creating a derivation for a Django project, and I’d like to collect static files to a directory that’s inside my package. I’m currently doing this by using mkPoetryApplication to create the package, and then have a second mkPoetryApplication with ${appWithoutStatic}/bin/django-admin collectstatic in configurePhase. This works but I was wondering if this is achievable without creating 2 derivations. 15:06:07
@andreas.schraegle:helsinki-systems.deAndreas Schrägle joined the room.23:35:54
23 Mar 2022
@asymmetric:matrix.dapp.org.ukasymmetric joined the room.13:36:58
@asymmetric:matrix.dapp.org.ukasymmetric

i'm trying to build a package that depends on cryptography 36.0.2, and it fails with:

error: hash mismatch in fixed-output derivation '/nix/store/cb7576730h5ny4x6177dcxy3gl2qvfvl-cryptography-36.0.2-vendor.tar.gz.drv':
         specified: sha256-kozYXkqt1Wpqyo9GYCwN08J+zV92ZWFJY/f+rulxmeQ=
            got:    sha256-6C4N445h4Xf2nCc9rJWpSZaNPilR9GfgbmKvNlSIFqg=

this is because the hash is hard-coded here, and it's now wrong.

what's the idea here? how do we keep that hash updated? should i just override on my end?

13:38:41
25 Mar 2022
@asymmetric:matrix.dapp.org.ukasymmetric could poetry2nix automatically detect and handle this edge case? 12:21:59
26 Mar 2022
@mou_bugtracker:matrix.orgmou
In reply to @sephi:matrix.org
Is there a way to use the environment of a derivation to add more files to it right before the Python package is created? I’m creating a derivation for a Django project, and I’d like to collect static files to a directory that’s inside my package. I’m currently doing this by using mkPoetryApplication to create the package, and then have a second mkPoetryApplication with ${appWithoutStatic}/bin/django-admin collectstatic in configurePhase. This works but I was wondering if this is achievable without creating 2 derivations.
i'm newbie with nix, but as far as i can understand, proper way to achieve desired, is to make override with custom build paramaters. poetry2nix uses nixpkgs.buildPythonPackage. So i believe there are plenty of post* hooks, which you can use to add aditional step to your build. You only need to figure out proper way to override resulting derivation.
08:45:18
@asymmetric:matrix.dapp.org.ukasymmetric
In reply to @mou_bugtracker:matrix.org
i'm newbie with nix, but as far as i can understand, proper way to achieve desired, is to make override with custom build paramaters. poetry2nix uses nixpkgs.buildPythonPackage. So i believe there are plenty of post* hooks, which you can use to add aditional step to your build. You only need to figure out proper way to override resulting derivation.
are you replying to me? sorry can't see what you're replying to
08:45:58
@mou_bugtracker:matrix.orgmou
In reply to @asymmetric:matrix.dapp.org.uk
are you replying to me? sorry can't see what you're replying to
to sephi
08:46:38
@mou_bugtracker:matrix.orgmou
In reply to @asymmetric:matrix.dapp.org.uk
could poetry2nix automatically detect and handle this edge case?
I do not know, but if i decided to try, i start by looking into pyproject.toml transformation, where dependencies are converted to buildInputs. poetry build-system.requires should be added to nativeBuildInputs of resulting buildPythonPackage.
08:51:33
@mou_bugtracker:matrix.orgmouThis is just my hypothesis )08:52:09
29 Mar 2022
@FRidh:matrix.orgFRidh joined the room.08:32:08
30 Mar 2022
@sephi:matrix.orgsephi
In reply to @mou_bugtracker:matrix.org
i'm newbie with nix, but as far as i can understand, proper way to achieve desired, is to make override with custom build paramaters. poetry2nix uses nixpkgs.buildPythonPackage. So i believe there are plenty of post* hooks, which you can use to add aditional step to your build. You only need to figure out proper way to override resulting derivation.
Good point, thanks for the hint. I’ll see if I can find something
13:22:04
31 Mar 2022
@adis:blad.isadisbladis mou asymmetric: The core problem would be solved by this upstream PR https://github.com/python-poetry/poetry/pull/2794 01:57:09
1 Apr 2022
@dincio:matrix.orgdincio joined the room.12:44:31
@dincio:matrix.orgdincio Hello everyone. I was trying to compile a project and the derivation failed when encountering the atomics pip package (https://pypi.org/project/atomics/) with this error:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 12:46:14
@dincio:matrix.orgdincio * Hello everyone. I was trying to compile a project and the derivation failed when encountering the atomics pip package (https://pypi.org/project/atomics/) with this error: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 12:46:33
@k900:0upti.meK900Scroll up 12:53:33
@dincio:matrix.orgdincio * Hello everyone. I was trying to compile a project and the derivation failed when encountering the atomics pip package (https://pypi.org/project/atomics/) with this error: "ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output." 12:53:34
@k900:0upti.meK900There's probably a more useful error there 12:53:39
@dincio:matrix.orgdinciook12:53:49
@dincio:matrix.orgdincioI found this12:55:12
@dincio:matrix.orgdincioRunning command python setup.py egg_info Traceback (most recent call last): File "<string>", line 1, in <module> File "/data/data/com.termux.nix/files/usr/tmp/nix-build-python3.9-atomics-1.0.2.drv-0/pip-req-build-44p_cncj/setup.py", line 6, in <module> import git ModuleNotFoundError: No module named 'git'12:55:22
@dincio:matrix.orgdincio * Running command python setup.py egg_info Traceback (most recent call last):File "<string>", line 1, in <module> File "/data/data/com.termux.nix/files/usr/tmp/nix-build-python3.9-atomics-1.0.2.drv-0/pip-req-build-44p_cncj/setup.py", line 6, in <module> import git ModuleNotFoundError: No module named 'git' 12:55:33
@k900:0upti.meK900Looks like it's missing some dependency 12:55:41
@k900:0upti.meK900You can fix that with an override 12:55:45
@k900:0upti.meK900But it might be a good idea to report this upstream too 12:55:54
@dincio:matrix.orgdincioOk, you mean report upstream using an issue?12:56:11
@k900:0upti.meK900Yes12:57:27

Show newer messages


Back to Room ListRoom Version: 6