!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
11 Sep 2024
@quixotic-mumble:matrix.orgNoah Sluss joined the room.22:07:07
12 Sep 2024
@artur:glasgow.socialmoved to @amadaluzia:tchncs.de changed their display name from (lambda (u) (format nil "~A is not using Matrix right now." u)) "Artur Manuel" to (lambda (u) (format nil "~a ~a")) "Artur" "Manuel".01:48:57
@artur:glasgow.socialmoved to @amadaluzia:tchncs.de changed their display name from (lambda (u) (format nil "~a ~a")) "Artur" "Manuel" to (lambda (f l) (format nil "~a ~a")) "Artur" "Manuel".01:56:00
@truh:matrix.orgtruh wecmyrc my guess would be that you need to add git to the buildInputs of RHVoice https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md 08:41:15
@truh:matrix.orgtruh Nah, the git clone in setup.py thing just won't work with nix 08:41:45
@truh:matrix.orgtruhLooks like setup.py won't try to call git clone if you give it the folder some other way.08:45:06
@truh:matrix.orgtruhScreenshot 2024-09-12 at 10.43.33.png
Download Screenshot 2024-09-12 at 10.43.33.png
08:45:15
@wecmyrc:matrix.orgwecmyrc
In reply to @truh:matrix.org
wecmyrc my guess would be that you need to add git to the buildInputs of RHVoice https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md
Thank you for the response. I think that during the build process, nix cannot use git, so I will use data obtained using fetchFromGitHub.
08:56:52
@tyberius_prime:matrix.orgTyberiusPrime (smilodon inopinatus)
In reply to @wecmyrc:matrix.org
Thank you for the response. I think that during the build process, nix cannot use git, so I will use data obtained using fetchFromGitHub.
(nix derivations can not access the network at all. Except for 'fixed output derivations', were you know exactly what they're going to produce.)
10:11:45
13 Sep 2024
@truh:matrix.orgtruhHence my second suggestion to provide the rhvoice source some other way.08:48:25
@wecmyrc:matrix.orgwecmyrc

I tried to provide RHVoice like this:

rhvoiceRepo = pkgs.fetchFromGitHub {
  owner = "RHVoice";
  repo = "RHVoice";
  rev = "8aac098edd6dac823abcfd64f2d141aea0d20bfc";
  sha256 = "sha256-1+kad+tWcmxYDlH7EAcvTGUNAY9dgnk4Kw39XqRjMtE=";
  fetchSubmodules = true;
  deepClone = true;
  leaveDotGit = true;
};

and in rhvoice-wrapped-data configurePhase pass it as link:

configurePhase = ''
  mkdir ./build
  ls -la
  ln -s ${rhvoiceRepo} ./build/RHVoice
'';

But in the end, it didn't work because I assume that setup.py, after installation, tried to delete the RHVoice source, which it didn't have permission to do. So I copied the rhvoice-wrapper-data repository, added RHVoice as a submodule, removed the git requests in setup.py, and now everything works. It's not the most elegant solution, but it's the best I've come up with for now. Thanks everyone for your help.

Here is the working repository: https://github.com/wecmyrc/rhvoice-wrapper-data-patch

Here is an example of usage:

rhvoice-wrapper-data = super.rhvoice-wrapper-data.overridePythonAttrs (old: rec {
  src = pkgs.fetchFromGitHub {
    owner = "wecmyrc";
    repo = "rhvoice-wrapper-data-patch";
    rev = "752534d8a4a99fe69540df201ce2db244c5bf77a";
    sha256 = "sha256-wpci92SxMMEI05gxcqla0sN4aS8JCa0y43WCQwmD2fw=";
    fetchSubmodules = true;
    deepClone = true;
  };
  buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools-scm ];
});
09:08:51
@wecmyrc:matrix.orgwecmyrc *

I tried to provide RHVoice like this:

rhvoiceRepo = pkgs.fetchFromGitHub {
  owner = "RHVoice";
  repo = "RHVoice";
  rev = "8aac098edd6dac823abcfd64f2d141aea0d20bfc";
  sha256 = "sha256-1+kad+tWcmxYDlH7EAcvTGUNAY9dgnk4Kw39XqRjMtE=";
  fetchSubmodules = true;
  deepClone = true;
  leaveDotGit = true;
};

and in rhvoice-wrapped-data configurePhase pass it as link:

configurePhase = ''
  mkdir ./build
  ln -s ${rhvoiceRepo} ./build/RHVoice
'';

But in the end, it didn't work because I assume that setup.py, after installation, tried to delete the RHVoice source, which it didn't have permission to do. So I copied the rhvoice-wrapper-data repository, added RHVoice as a submodule, removed the git requests in setup.py, and now everything works. It's not the most elegant solution, but it's the best I've come up with for now. Thanks everyone for your help.

Here is the working repository: https://github.com/wecmyrc/rhvoice-wrapper-data-patch

Here is an example of usage:

rhvoice-wrapper-data = super.rhvoice-wrapper-data.overridePythonAttrs (old: rec {
  src = pkgs.fetchFromGitHub {
    owner = "wecmyrc";
    repo = "rhvoice-wrapper-data-patch";
    rev = "752534d8a4a99fe69540df201ce2db244c5bf77a";
    sha256 = "sha256-wpci92SxMMEI05gxcqla0sN4aS8JCa0y43WCQwmD2fw=";
    fetchSubmodules = true;
    deepClone = true;
  };
  buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools-scm ];
});
09:20:16
16 Sep 2024
@silentlurker:matrix.orgsilentlurker joined the room.20:02:27
17 Sep 2024
@penguincoder:matrix.wolfie.pw@penguincoder:matrix.wolfie.pw left the room.14:40:13
18 Sep 2024
@artur:glasgow.socialmoved to @amadaluzia:tchncs.de changed their profile picture.23:00:42
21 Sep 2024
@luna-null:matrix.org@luna-null:matrix.org joined the room.05:45:21
@j0xxx:nixbitcoin.orgwkhi, does anyone know if there is a way to override MAX_JOBS when building a python package? Getting OOM errors09:13:04
@k900:0upti.meK900 --option cores 4 09:32:12
@k900:0upti.meK900Or whatever number you want09:32:15
@j0xxx:nixbitcoin.orgwkhmm i was hoping to be able to override just that package so the rest of the system is unaffected plus it doesnt require keeping track of extra build parameters10:50:26
25 Sep 2024
@luna-null:matrix.org@luna-null:matrix.org changed their display name from luna-null to Autumn.06:39:14
26 Sep 2024
@ersei:ersei.net@ersei:ersei.net joined the room.02:05:20
@ersei:ersei.net@ersei:ersei.netHey all, I'm having trouble with poetry2nix. My pyproject.toml has psycopg-c, and when I go to build the package, I get a "ModuleNotFoundError: No module named 'setuptools'"02:07:42
@ersei:ersei.net@ersei:ersei.netany guidance?02:07:48
@ersei:ersei.net@ersei:ersei.netafaik psycopg-c should have the override already02:19:35
@ersei:ersei.net@ersei:ersei.netI added an override I guess02:31:24
@jfahne:matrix.orgjfahne joined the room.02:45:44
@vengmark2:matrix.orgl0b0
In reply to @ersei:ersei.net
I added an override I guess
Did that work? If so, would you be OK to create a PR?
02:48:05
@ersei:ersei.net@ersei:ersei.net
In reply to @vengmark2:matrix.org
Did that work? If so, would you be OK to create a PR?
yeah, I was just confused since I thought psycopg-c already has one
03:03:01
27 Sep 2024
@ericadelagnier:multi.coopErica joined the room.15:36:54

Show newer messages


Back to Room ListRoom Version: 6