!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

317 Members
https://github.com/nix-community/poetry2nix61 Servers

Load older messages


SenderMessageTime
12 Nov 2023
@flomonster:matrix.orgflomonsterHello, I've just made my first small contribution to the project. I'd love to get some feedback. https://github.com/nix-community/poetry2nix/pull/141315:11:52
@k900:0upti.meK900Thanks, queued for merge15:15:51
@captainkranch:matrix.orgDaniel García M joined the room.20:41:14
@captainkranch:matrix.orgDaniel García Mdid you solved this? I'm having the same issue21:26:38
@captainkranch:matrix.orgDaniel García M

I'm trying to build a project. It uses pydantic, which uses maturin. How do I add maturin to the overrides? maturin is written in rust... here is my default.nix:

{ pkgs ? import <nixpkgs> {} }:
let
  pypkgs-build-requirements = {
    annotated-types = [ "hatchling" ];
    urllib3 = [ "hatchling" ];
    pydantic-core = [ pkgs.maturin ];
  };
  overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend (self: super:
    builtins.mapAttrs (package: build-requirements:
      (builtins.getAttr package super).overridePythonAttrs (old: {
        buildInputs = (old.buildInputs or [ ]) ++ (builtins.map (pkg: if builtins.isString pkg then builtins.getAttr pkg super else pkg) build-requirements);
      })
    ) pypkgs-build-requirements
  );
in pkgs.poetry2nix.mkPoetryApplication {
  projectDir = ./.;
  overrides = overrides;
}

21:32:25
@captainkranch:matrix.orgDaniel García M

here is the pyproject.toml:

[tool.poetry]
name = "app"
version = "0.1.0"
description = ""
authors = ["danielg"]
readme = "README.md"
#packages = [{include = "src/scripts/*.py"}]

[tool.poetry.dependencies]
python = "^3.10"
dash = "^2.11.0"
plotly = "^5.15.0"
pandas = "^2.0.2"
dash-bootstrap-components = "^1.4.1"
python-dotenv = "^1.0.0"
pymysql = "^1.1.0"
sqlalchemy = "^2.0.17"
openpyxl = "^3.1.2"
pydantic = "^2.0"

[tool.poetry.scripts]
web-app = "poetry.console.application:main"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"


21:33:41
@captainkranch:matrix.orgDaniel García M set a profile picture.21:34:22
13 Nov 2023
@svitax:matrix.orgsvitax joined the room.07:04:36
@adis:blad.isadisbladisRedacted or Malformed Event07:50:45
@adis:blad.isadisbladisPdm2nix is now feature complete07:51:34
@k900:0upti.meK900So cool07:52:24
@k900:0upti.meK900I should try it on one of my projects07:52:29
@k900:0upti.meK900At some point07:52:31
@adis:blad.isadisbladis=)07:52:50
@adis:blad.isadisbladisI want to rebuild poetry2nix with the same ux07:52:58
@adis:blad.isadisbladisAs "just" an overlay generator07:53:14
@adis:blad.isadisbladisFresh docs: https://adisbladis.github.io/pdm2nix/11:53:53
@FRidh:matrix.orgFRidhA while ago the flake interface for poetry2nix changed. Is there a description somewhere about how to use it now?13:07:21
@FRidh:matrix.orgFRidh
In reply to @FRidh:matrix.org
A while ago the flake interface for poetry2nix changed. Is there a description somewhere about how to use it now?

OK this was kind of what I was looking for

inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryPackages mkPoetryEnv overrides;

13:24:57
14 Nov 2023
@jonge:ukvly.orgjonge joined the room.10:30:53
15 Nov 2023
@kranzes:matrix.org@kranzes:matrix.org joined the room.12:40:46
@grahamc:nixos.org@grahamc:nixos.orgchanged room power levels.16:15:53
@grahamc:nixos.org@grahamc:nixos.org 16:35:58
@grahamc:nixos.org@grahamc:nixos.org 16:38:47
@grahamc:nixos.org@grahamc:nixos.org left the room.16:39:44
@qyliss:fairydust.space@qyliss:fairydust.space joined the room.17:31:47
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.18:12:46
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.18:12:46
@eisfunke:eisfunke.com@eisfunke:eisfunke.com changed their profile picture.22:41:06
16 Nov 2023
@dustee:matrix.orgdustee joined the room.09:00:40

Show newer messages


Back to Room ListRoom Version: 6