!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

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

Load older messages


SenderMessageTime
14 Aug 2022
@k900:0upti.meK900That does not look right 14:25:28
@k900:0upti.meK900How are you building it exactly? 14:25:36
@ethanabrooks:matrix.orgEthan Brooks
nix build
14:25:51
@ethanabrooks:matrix.orgEthan BrooksI'm using flakes14:25:54
@ethanabrooks:matrix.orgEthan BrooksI can throw together a minimal repro real quick14:26:16
@ethanabrooks:matrix.orgEthan BrooksI may have identified an issue (if not the issue)14:32:19
@ethanabrooks:matrix.orgEthan Brooks Ok I think I am past the /homeless-shelter issue -- I was not probably linking the tensorstore.nix override in my flake.nix. 14:34:48
@ethanabrooks:matrix.orgEthan BrooksI'm running into a different issue relating to tensorstore, but I don't want to monopolize this channel.14:35:13
@ethanabrooks:matrix.orgEthan BrooksI can work on it a bit and if I can't figure it out, I'll check back in, if that's alright.14:35:30
@ethanabrooks:matrix.orgEthan Brooks

Is it possible to apply git patches to source code, as in

buildPythonPackage {
  ...
  patches = [./nixfiles/tensorstore.patch];
}
14:48:36
@k900:0upti.meK900Yes 14:48:53
@ethanabrooks:matrix.orgEthan Brooks

Is this the format that is expected for a patch?

Unstaged changes after reset:
M	bazelisk.py
diff --git a/bazelisk.py b/bazelisk.py
index 919b776..b07d3dc 100755
--- a/bazelisk.py
+++ b/bazelisk.py
@@ -270,6 +270,7 @@ def trim_suffix(string, suffix):
 def download_bazel_into_directory(version, is_commit, directory):
   bazel_filename = determine_bazel_filename(version)
   bazel_url = determine_url(version, is_commit, bazel_filename)
+  print("######################################", bazel_url)

   filename_suffix = determine_executable_filename_suffix()
   bazel_directory_name = trim_suffix(bazel_filename, filename_suffix)
14:50:06
@ethanabrooks:matrix.orgEthan Brooks I produced that with git diff > /path/to/tensorstore.patch 14:50:30
@ethanabrooks:matrix.orgEthan BrooksI'm a little new to patch files -- and to nix, so thank you for all your help!14:50:55
@k900:0upti.meK900Generally yes 14:51:00
@ethanabrooks:matrix.orgEthan Brooks

Where can I store these patch files? I'm getting

error: getting status of '/nix/store/8qyfa22w7ci343lx8dy1jkpd4pvxqxl6-source/tensorstore.patch': No such file or directory
14:56:00
@k900:0upti.meK900You need to add it to git 14:56:12
@k900:0upti.meK900For it to work 14:56:14
@ethanabrooks:matrix.orgEthan BrooksPerfect! That worked. Thank you.14:56:35
@ethanabrooks:matrix.orgEthan Brooks I am not 100% sure this is a nix issue but tensorstore/bazelisk.py seems to be trying to download bazel right here: https://github.com/google/tensorstore/blob/fd14f04c33620645da94667c4fa860b258417dcf/bazelisk.py#L449 15:08:28
@ethanabrooks:matrix.orgEthan Brooks

We then get this error:

Downloading https://releases.bazel.build/5.0.0/release/bazel-5.0.0-linux-x86_64...
Traceback (most recent call last):
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/urllib/request.py", line 1346, in d>
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/http/client.py", line 1285, in requ>
    self._send_request(method, url, body, headers, encode_chunked)
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/http/client.py", line 1331, in _sen>
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/http/client.py", line 1280, in endh>
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/http/client.py", line 1040, in _sen>
    self.send(msg)
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/http/client.py", line 980, in send
    self.connect()
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/http/client.py", line 1447, in conn>
    super().connect()
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/http/client.py", line 946, in conne>
    self.sock = self._create_connection(
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/socket.py", line 823, in create_con>
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/nix/store/9xnq0r2a14s9qc5c27ppzq1p7j8wqx22-python3-3.9.13/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
15:09:10
@k900:0upti.meK900That is normal, the build sandbox has no network15:09:18
@ethanabrooks:matrix.orgEthan BrooksRight ok that makes sense15:09:27
@ethanabrooks:matrix.orgEthan BrooksSo in that case, would it be best to write a patch that uses the nix bazel instead of downloading a new one?15:09:55
@k900:0upti.meK900Can you tell it to use an existing copy of bazel somehow?15:10:03
@ethanabrooks:matrix.orgEthan BrooksLet me play around with it. Should be possible. Thanks.15:10:25
@k900:0upti.meK900We have a bazel in nixpkgs15:10:49
@ethanabrooks:matrix.orgEthan Brooks If I were to write a patch that points to that bazel instead, how would I get the /nix/store/.../bazel path? 15:11:32
@k900:0upti.meK900 ${bazel}/bin/bazel 15:11:59
@k900:0upti.meK900But you can't do that in the patch 15:12:05

There are no newer messages yet.


Back to Room ListRoom Version: 6