!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

332 Members
https://github.com/nix-community/poetry2nix68 Servers

Load older messages


SenderMessageTime
18 Jan 2022
@das-g:matrix.orgdas-g *

When I try any of the new nix commands (nix shell, nix develop, nix build) after that, I get

error: flake 'path:/home/das-g/tmp/imgapp' does not provide attribute 'devShells.x86_64-linux.devShell.x86_64-linux', 'packages.x86_64-linux.devShell.x86_64-linux', 'legacyPackages.x86_64-linux.devShell.x86_64-linux', 'devShell.x86_64-linux' or 'defaultPackage.x86_64-linux'
14:17:21
@das-g:matrix.orgdas-g *

When I try any of the new nix commands (nix shell, nix develop, nix build) after that, I get

error: flake 'path:/home/das-g/tmp/imgapp' does not provide attribute 'devShells.x86_64-linux.devShell.x86_64-linux', 'packages.x86_64-linux.devShell.x86_64-linux', 'legacyPackages.x86_64-linux.devShell.x86_64-linux', 'devShell.x86_64-linux' or 'defaultPackage.x86_64-linux'

for nix develop and

error: flake 'path:/home/das-g/tmp/imgapp' does not provide attribute 'packages.x86_64-linux.defaultPackage.x86_64-linux', 'legacyPackages.x86_64-linux.defaultPackage.x86_64-linux' or 'defaultPackage.x86_64-linux'

for nix build and nix shell.

14:22:18
@das-g:matrix.orgdas-g oh, wait, it sets defaultApp in there, but not defaultPackage. 14:27:17
@tcelferact:matrix.orgtcelferact joined the room.17:57:12
@tcelferact:matrix.orgtcelferact

Hi folks, I'm struggling to define an override that will get msgpack to build on an M1 mac. It looks like poetry2nix builds a wheel that it can't then run:

  Created wheel for msgpack: filename=msgpack-1.0.2-cp37-cp37m-macosx_11_0_arm64.whl size=67561 sha256=141d4aff3d7453e3411c0ffb7daeaf68bececd4aff7054d41a616a07a9ba7036
  Stored in directory: /private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/pip-ephem-wheel-cache-i7nzg6nu/wheels/04/ab/f5/eee33f4ffc30671d9708fc39bd5968a5c1c35e3867f17ff387
Successfully built msgpack
Removed build tracker: '/private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/pip-req-tracker-ghv1i0v0'
Finished creating a wheel...
Finished executing pipBuildPhase
installing
Executing pipInstallPhase
/private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/msgpack-1.0.2/dist /private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/msgpack-1.0.2
ERROR: msgpack-1.0.2-cp37-cp37m-macosx_11_0_arm64.whl is not a supported wheel on this platform.
builder for '/nix/store/f2zf6z5k2120z7f8h7qcjvi34bz4iy4w-python3.7-msgpack-1.0.2.drv' failed with exit code 1

I'm way off understanding how to fix this, although I have tried an addPoetry style override which didn't work:

    msgpack = super.msgpack.overridePythonAttrs (
      old: {
        nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.poetry-core ];
      }
    );

Can anyone offer advice? Thanks!

18:00:07
19 Jan 2022
@adis:blad.isadisbladis
In reply to @tcelferact:matrix.org

Hi folks, I'm struggling to define an override that will get msgpack to build on an M1 mac. It looks like poetry2nix builds a wheel that it can't then run:

  Created wheel for msgpack: filename=msgpack-1.0.2-cp37-cp37m-macosx_11_0_arm64.whl size=67561 sha256=141d4aff3d7453e3411c0ffb7daeaf68bececd4aff7054d41a616a07a9ba7036
  Stored in directory: /private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/pip-ephem-wheel-cache-i7nzg6nu/wheels/04/ab/f5/eee33f4ffc30671d9708fc39bd5968a5c1c35e3867f17ff387
Successfully built msgpack
Removed build tracker: '/private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/pip-req-tracker-ghv1i0v0'
Finished creating a wheel...
Finished executing pipBuildPhase
installing
Executing pipInstallPhase
/private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/msgpack-1.0.2/dist /private/tmp/nix-build-python3.7-msgpack-1.0.2.drv-0/msgpack-1.0.2
ERROR: msgpack-1.0.2-cp37-cp37m-macosx_11_0_arm64.whl is not a supported wheel on this platform.
builder for '/nix/store/f2zf6z5k2120z7f8h7qcjvi34bz4iy4w-python3.7-msgpack-1.0.2.drv' failed with exit code 1

I'm way off understanding how to fix this, although I have tried an addPoetry style override which didn't work:

    msgpack = super.msgpack.overridePythonAttrs (
      old: {
        nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ self.poetry-core ];
      }
    );

Can anyone offer advice? Thanks!

That override has nothing to do with the underlying problem, which I'm guessing might have something to do with your setuptools version
03:27:39
@k900:0upti.meK900 joined the room.06:59:07
@myme:matrix.orgmyme joined the room.10:43:30
@tcelferact:matrix.orgtcelferact hi adisbladis I don't have setuptools as a dependency in my poetry.lock, so I guess that would come from poetry2nix? 14:18:32
@k900:0upti.meK900It comes from your Python/pip14:19:21
@k900:0upti.meK900Easiest way is probably to use a newer Python than 3.714:19:30
@jakefromstatefarm:jupiterbroadcasting.comjake :: Stateless -> Farm joined the room.14:44:17
@mou_bugtracker:matrix.orgmouRedacted or Malformed Event16:23:13
@tcelferact:matrix.orgtcelferactUnfortunately that's not easier as the build is for a django monolith and upgrading would be a huge time investment. This must be specific to nix in some way as our docker image still builds fine on M1?16:28:10
@tcelferact:matrix.orgtcelferact

I tried upgrading to the 21.11 channel, but I now run into the following for uwsgi:

pip._internal.exceptions.InstallationError: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.

The dir that's supposedly missing the file (it's a tmp dir and I can't check) is /private/tmp/nix-build-python3.7-uwsgi-2.0.18.drv-0.

16:30:15
@tcelferact:matrix.orgtcelferactthis is probably just a distraction, apologies16:52:10
@tcelferact:matrix.orgtcelferact if setuptools is the problem, is there some way to patch the version used by nix's python 3.7 build? 16:52:36
@k900:0upti.meK900You can probably add a newer version to buildInputs17:14:40
@zupo:matrix.orgzupo joined the room.21:14:15
@zupo:matrix.orgzupogheesh hunting this bug down almost killed me: https://github.com/nix-community/poetry2nix/issues/52321:14:31
@zupo:matrix.orgzupobut I stand victorious! ⚔️ 🐛21:15:19
@adis:blad.isadisbladis
In reply to @zupo:matrix.org
gheesh hunting this bug down almost killed me: https://github.com/nix-community/poetry2nix/issues/523

I don't think this is a bug in poetry2nix, but an unfortunate side effect of how nixpkgs python infra propagates it's dependencies.

What does which python say?

22:18:21
@zupo:matrix.orgzupo[nix-shell:~/work/big-sur-poetry-test]$ which python /nix/store/avn3nqyfphpaakj2xijazsfry0g93f10-python3-3.9.6/bin/python23:24:59
@zupo:matrix.orgzupoRedacted or Malformed Event23:26:44
@zupo:matrix.orgzupo adisbladis: Ah I see, yes, makes sense that it's leaky docker-compose in nixpkgs. Should I move the bug report there? 23:29:52
@adis:blad.isadisbladis
In reply to @zupo:matrix.org
adisbladis: Ah I see, yes, makes sense that it's leaky docker-compose in nixpkgs. Should I move the bug report there?

I think so.
A quick fixup on your end could be to override docker-compose something along these lines:

docker-compose.overridePythonAttrs(old: {
  postFixup = ''
    rm $out/nix-support/propagated-build-inputs
  '';
})
23:38:26
@adis:blad.isadisbladisThis is a pretty pervasive problem in nixpkgs23:39:27
@adis:blad.isadisbladis And I think that the correct solution would be to change buildPythonApplication to not propagate python deps 23:39:57
@adis:blad.isadisbladis zupo: I do the same thing for the Poetry derivation: https://github.com/nix-community/poetry2nix/blob/master/pkgs/poetry/default.nix#L41-L45 23:40:54
20 Jan 2022
@zupo:matrix.orgzupo👍👍 thanks07:24:29

Show newer messages


Back to Room ListRoom Version: 6