13 Jun 2024 |
ixxie | 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 | thanks anyway | 12:24:45 |
TyberiusPrime (smilodon inopinatus) | no worries | 12:26:41 |
15 Jun 2024 |
| @roastedcheesee:matrix.org joined the room. | 17:32:41 |
@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 |
| Josefine changed their display name from Jonas Katzke to Josefine. | 07:32:34 |
20 Jun 2024 |
TyberiusPrime (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 |
TyberiusPrime (smilodon inopinatus) | hah, all I need to do is overwrite src! | 09:51:06 |
TyberiusPrime (smilodon inopinatus) | of course | 09:51:09 |
| Aaron Steele joined the room. | 16:39:05 |
colonelpanic | Does anyone have any what is going on with libcst?
seems like its not extracting a tar archive that it should be:
error: opening file '/nix/store/201zc10pdd4ls1gmpsmbl710lm0q6ai7-libcst-1.1.0.tar.gz/native/Cargo.lock': Not a directory | 17:00:51 |
Aaron Steele | potentially silly question: how to get keyrings-google-artifactregistry-auth working in mkPoetryEnv ? i include it as a buildInput and it works in the shellHook , but when i add a private source in tool.poetry.source' and try nix-shell`, i get these errors:
building '/nix/store/had00ag5f29zdjwlv5hmmc596cl60sjv-genjax-0.4.0-py3-none-any.whl.drv'...
Reading index https://us-west1-python.pkg.dev/probcomp-caliban/probcomp/simple/genjax/
Traceback (most recent call last):
File "/nix/store/0rzh74dywg10ggl3ds6khsdpc84nbp96-fetch-from-legacy.py", line 82, in <module>
response = urllib.request.urlopen(req, context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 525, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 634, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 563, in error
return self._call_chain(*args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
| 17:12:06 |
Aaron Steele | * potentially silly question: how to get keyrings-google-artifactregistry-auth working in mkPoetryEnv ? i include it as a buildInput and it works in the shellHook , but when i add a private source in tool.poetry.source and try nix-shell , i get these errors:
building '/nix/store/had00ag5f29zdjwlv5hmmc596cl60sjv-genjax-0.4.0-py3-none-any.whl.drv'...
Reading index https://us-west1-python.pkg.dev/probcomp-caliban/probcomp/simple/genjax/
Traceback (most recent call last):
File "/nix/store/0rzh74dywg10ggl3ds6khsdpc84nbp96-fetch-from-legacy.py", line 82, in <module>
response = urllib.request.urlopen(req, context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 525, in open
response = meth(req, response)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 634, in http_response
response = self.parent.error(
^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 563, in error
return self._call_chain(*args)
^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/nix/store/7hnr99nxrd2aw6lghybqdmkckq60j6l9-python3-3.11.9/lib/python3.11/urllib/request.py", line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 401: Unauthorized
| 17:12:27 |
Aaron Steele | there was a related issue here, although it's not clear how to use the workaround: https://github.com/nix-community/poetry2nix/issues/672#issuecomment-1744109953 | 17:13:32 |
Aaron Steele | (thanks for any guidance!!) | 17:13:46 |
Aaron Steele | here's my default.nix
{ pkgs ? import <nixpkgs> { } }:
let
poetry2nix = pkgs.callPackage (builtins.fetchTarball
"https://github.com/nix-community/poetry2nix/archive/master.tar.gz") { };
python312 = pkgs.python312;
keyrings = pkgs.python312Packages.keyrings-google-artifactregistry-auth;
gexEnv = poetry2nix.mkPoetryEnv {
projectDir = ./.;
editablePackageSources = { gex = ./gex; };
python = python312;
pyproject = ./pyproject.toml;
poetrylock = ./poetry.lock;
preferWheels = true;
};
in pkgs.mkShell {
buildInputs = [ gexEnv pkgs.google-cloud-sdk keyrings ];
shellHook = ''
# keyrings are available here and I'm authenticated in google cloud
'';
}
| 17:16:02 |
21 Jun 2024 |
TyberiusPrime (smilodon inopinatus) | In reply to @elonsroadster:matrix.org Does anyone have any what is going on with libcst?
seems like its not extracting a tar archive that it should be:
error: opening file '/nix/store/201zc10pdd4ls1gmpsmbl710lm0q6ai7-libcst-1.1.0.tar.gz/native/Cargo.lock': Not a directory that looks like the override is broken. I encountered something similar recently trying to wrap polaris.
But the nixpkgs libcst module - at least in master - uses fetchFromGitHub, so it really shouldn't have a tarball. And I don't see an override in poetry2nix Hm.
| 06:12:24 |
TyberiusPrime (smilodon inopinatus) | does poetry2nix at all try to detect the build system? or is it all manual overrides? | 06:12:38 |
colonelpanic | I think it might be the cargo tarball? | 06:24:00 |
| @janik0:matrix.org left the room. | 09:14:53 |
TyberiusPrime (smilodon inopinatus) | I think it's the source tarball, where it's trying to get the Cargo.lock from? | 12:33:56 |
TyberiusPrime (smilodon inopinatus) | you got a minimal reproducing example? | 12:37:03 |
| @linus:schreibt.jetzt left the room. | 14:03:29 |
25 Jun 2024 |
ˈt͡sɛːzaɐ̯ | How much of a sin is overrides = defaultPoetryOverrides.extend (_: _: pkgs.python311Packages); ? | 01:50:45 |
TyberiusPrime (smilodon inopinatus) | In reply to @julius:mtx.liftm.de How much of a sin is overrides = defaultPoetryOverrides.extend (_: _: pkgs.python311Packages); ? that sounds like a good way to get 'weird' problems ;). | 13:12:19 |
TyberiusPrime (smilodon inopinatus) | no later then when your pyproject.toml says 3.12 and you forgot to adjust this ^^ | 13:12:38 |
26 Jun 2024 |
colonelpanic | I'm getting
➜ LD_LIBRARY_PATH='' nix build '.?submodules=1#railbird-api' --dry-run --impure --show-trace warning: Git tree '/home/imalison/Projects/railbird' is dirty trace: warning: pythonForBuild (from python* ) has been renamed to pythonOnBuildForHost trace: warning: pythonForBuild (from python* ) has been renamed to pythonOnBuildForHost trace: warning: pythonForBuild (from python* ) has been renamed to pythonOnBuildForHost evaluating derivation 'git+file:///home/imalison/Projects/railbird#railbird-api'error: stack overflow (possible infinite recursion)
after updating the nixpkgs and poetry2nix versions in my flake.
sort of at a loss as to how to try to even ascertain which package is causing this because why depends and dry run are failing with the same issue.
the only thing I can think of is to start putting traces in the poetry2nix code itself. Does anyone have any idea how I can debug this?
| 00:00:10 |
28 Jun 2024 |
| Howard Nguyen-Huu joined the room. | 02:44:28 |
30 Jun 2024 |
colonelpanic | turns out that my nixpkgs was too out of date for the newer poetry2nix that I was using | 04:22:56 |
1 Jul 2024 |
| Olaf Krasicki Freund joined the room. | 21:57:20 |