!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

298 Members
https://github.com/nix-community/poetry2nix | Poetry2nix is unmaintained https://github.com/nix-community/poetry2nix/issues/186553 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
13 Jun 2024
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus) adisbladis: Hi, are you still working on poetry2nix? 12:09:01
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus) ixxie: I think you just call mkPoetryApplication and then they're all in ./results/bin 12:09:58
@ixxie:matrix.org@ixxie:matrix.org
In reply to @tyberius_prime:matrix.org
I thought it was taken from pyproject.toml? the source indicate that this is true

I've set the name in pyproject.toml, and set pname in mkPoetryApplication but when I run nix profile install .#package-name but then I still get something like this:

> nix profile list

Name:               path/from/git/root/to/flake
Flake attribute:    packages.x86_64-linux.default
Original flake URL: git+file:///home/ixxie/project?dir=path/from/git/root/to/flake
Locked flake URL:   git+file:///home/ixxie/project?dir=path/from/git/root/to/flake
Store paths:        /nix/store/4r112qhr7f3vsxj3jx4ynvyb8560vjxf-python3.11-cli-0.1
12:15:12
@ixxie:matrix.org@ixxie:matrix.orgI mean it installs well, I'm just wondering why the name is like this12:16:43
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)well, the name (pname + version) ends up in the store path, which I giuess is where the python3.11-cli comes from (cli being set in your pyproject.toml). I suppose you want to change 'Name:'?12:16:49
@ixxie:matrix.org@ixxie:matrix.org
In reply to @tyberius_prime:matrix.org
well, the name (pname + version) ends up in the store path, which I giuess is where the python3.11-cli comes from (cli being set in your pyproject.toml).

I suppose you want to change 'Name:'?
yep, because that would be how I refer to it when managing it with nix profile
12:17:18
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)(I don't use nix profile, so I can't comment on where it's getting the name from.)12:17:30
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)I mean you can change the flake attribute easily enough, so 'flake attribute' is something you could change, at the price of having to do nix profile install /path/to/flake#name12:18:41
@ixxie:matrix.org@ixxie:matrix.org
In reply to @tyberius_prime:matrix.org
I mean you can change the flake attribute easily enough, so 'flake attribute' is something you could change, at the price of having to do nix profile install /path/to/flake#name
yeah the attribute hasn't been an issue
12:24:42
@ixxie:matrix.org@ixxie:matrix.orgthanks anyway12:24:45
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)no worries12:26:41
15 Jun 2024
@roastedcheesee:matrix.org@roastedcheesee:matrix.org joined the room.17:32:41
@roastedcheesee:matrix.org@roastedcheesee:matrix.org

hey, how can I override the generated inputs in mkPoetryApplication? I know I can override the dependencies but I can't manage to add inputs to the package itself

      mkPoetryApplication {
        projectDir = src;
        patches = [ ./salmon.patch ];
        overrides = defaultPoetryOverrides.extend (self: super: {
          bencoder-pyx = super.bencoder-pyx.overridePythonAttrs (old: {
            buildInputs = (old.buildInputs or []) ++ [ super.setuptools super.cython ];
          });
          pyimgurapi = super.pyimgurapi.overridePythonAttrs (old: {
            buildInputs = (old.buildInputs or []) ++ [ super.poetry ];
          });
          heybrochecklog = super.heybrochecklog.overridePythonAttrs (old: {
            patches = (old.patches or []) ++ [ ./salmon.patch ]; # ffs
            buildInputs = (old.buildInputs or []) ++ [ super.setuptools super.poetry ];
          });
          dottorrent = super.dottorrent.overridePythonAttrs (old: {
            buildInputs = (old.buildInputs or []) ++ [ super.setuptools ];
          });
          bs4 = super.bs4.overridePythonAttrs (old: {
            buildInputs = (old.buildInputs or []) ++ [ super.setuptools ];
          });
          pyimgur = super.pyimgur.overridePythonAttrs (old: {
            buildInputs = (old.buildInputs or []) ++ [ super.setuptools ];
          });
        });
      };

this is what I have so far, I tried overriding it together with the other dependencies but it had no effect

17:36:02
18 Jun 2024
@yusu:matrix.orgJosefine changed their display name from Jonas Katzke to Josefine.07:32:34
20 Jun 2024
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)Poetry2nix is IDF, right? how do I get a dependency on that IDF? I'm trying a wild thing, where I teach poetry mercurial by prefetching the mercurial repo (&rev) into the nix store, and rewriting the lock files a bit, but I can only build it in impure mode since even if I stick the fetchhg into the build inputs of the python package, that's not there when poetry2nix does it's thing (and why would it...)09:10:10
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)hah, all I need to do is overwrite src!09:51:06

Show newer messages


Back to Room ListRoom Version: 6