!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

319 Members
https://github.com/nix-community/poetry2nix63 Servers

Load older messages


SenderMessageTime
28 Sep 2024
@ersei:ersei.net@ersei:ersei.netso I'm working on making a PR to fix some build tools issues16:51:46
@ersei:ersei.net@ersei:ersei.netbut psycopg-c also depends on postgresql.dev16:51:54
@ersei:ersei.net@ersei:ersei.net * but psycopg-c also depends on postgresql.dev 16:52:00
@ersei:ersei.net@ersei:ersei.netwhat's the best way to handle that kind of override16:52:07
@ersei:ersei.net@ersei:ersei.netoh I see the issue16:54:02
@ersei:ersei.net@ersei:ersei.net because psycopg had an override to add postgres to it (not postgresql.dev) the override to add setuptools was removed 16:54:29
@ersei:ersei.net@ersei:ersei.netyep, can confirm that this is a bug16:59:00
@ersei:ersei.net@ersei:ersei.netby removing psycopg's override in defaults.nix, the build system for it works16:59:16
@ersei:ersei.net@ersei:ersei.netI'm not sure how I would go around fixing that though16:59:28
@ersei:ersei.net@ersei:ersei.net * by removing psycopg's override in defaults.nix, the build system for it works (after adding an overlay to add postgresql.dev back in)16:59:46
@ersei:ersei.net@ersei:ersei.net * by removing psycopg's override in defaults.nix, the build system for it works (after adding an overlay to add postgresql.dev back in) 16:59:53
@ersei:ersei.net@ersei:ersei.netmy guess is that the ordering in lib.composeManyExtensions is not as expected?17:01:06
@ersei:ersei.net@ersei:ersei.net

The result is produced by using the update operator //. This means nested values of previous overlays are not merged recursively. In other words, previously defined attributes are replaced, ignoring the previous value, unless referenced by the overlay; for example final: prev: { foo = final.foo + 1; }.

17:01:53
@ersei:ersei.net@ersei:ersei.net *

The result is produced by using the update operator //. This means nested values of previous overlays are not merged recursively. In other words, previously defined attributes are replaced, ignoring the previous value, unless referenced by the overlay; for example final: prev: { foo = final.foo + 1; }.

17:02:00
@ersei:ersei.net@ersei:ersei.netnvm I was not being smart and forgot to update my flake lockfile when making changes to my local copy17:11:25
@ersei:ersei.net@ersei:ersei.netI'm not quite sure what exactly was going on but everything builds so17:15:48
@ersei:ersei.net@ersei:ersei.netanyway made a pr for types-cffi https://github.com/nix-community/poetry2nix/pull/183117:23:06
@ersei:ersei.net@ersei:ersei.netoh someone beat me to the psycopg-c pr and my fork that I was testing with included those changes https://github.com/nix-community/poetry2nix/commit/038825873c3c3c7f9e238384e7324a3e7f7a1b1517:25:24
@ersei:ersei.net@ersei:ersei.netmakes sense now17:25:27
30 Sep 2024
@ericadelagnier:multi.coopEricaThank you ! would you know a CLI alternative to the python subprocess ?08:08:26
1 Oct 2024
@-_o:matrix.org-_o joined the room.21:05:24
2 Oct 2024
@mirorred_basilisk:matrix.orgmirorred_basilisk joined the room.14:14:13
@mirorred_basilisk:matrix.orgmirorred_basiliskHi, not sure if this is the place for this but does poetry2nix work for installing an existing github repo as a package? i.e. If there's an existing project with poetry.toml etc and I would like to write a flake to install it as a program in my config?14:17:48
@k900:0upti.meK900You don't need a flake for this14:18:40
@k900:0upti.meK900But it could work yes14:18:45
@mirorred_basilisk:matrix.orgmirorred_basilisk
In reply to @k900:0upti.me
You don't need a flake for this
oh really? what's the simpler solution?
14:19:47
@mirorred_basilisk:matrix.orgmirorred_basilisk

Because after a lot of fiddling I've got a flake that looks like this:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # or a stable version
    # Poetry required to build this flake
    poetry2nix.url = "github:nix-community/poetry2nix";
  };

  outputs = { self, nixpkgs, poetry2nix }: {
    packages.x86_64-linux.mypackage = with nixpkgs;
    # The little incantation to use poetry2nix
      let
        system = "x86_64-linux";
        pkgs = legacyPackages.${system};
        poetry2nixLib = poetry2nix.lib.mkPoetry2Nix { inherit pkgs; };
      in poetry2nixLib.mkPoetryApplication rec {
        pname = "mypackage";
        version = "3.2.5";

        # Attempt to fetchFromGitHub as the source dir
        projectDir = pkgs.fetchFromGitHub {
          ...
        };

        meta = with lib; {
          ...
        };
      };
  };
}

and it's just giving me a recursion error

14:19:57
@k900:0upti.meK900You can just define a package directly in your config14:20:00
@k900:0upti.meK900That is possible on some packages, yes14:20:14
@k900:0upti.meK900It could just be a poetry2nix bug14:20:26

Show newer messages


Back to Room ListRoom Version: 6