pypi2nix
pypi2nix copied to clipboard
installation on darwin fails
nix-env -if https://github.com/garbas/pypi2nix/tarball/master
->
Traceback (most recent call last):
File "/nix/store/xskfz2hipjk67q6zxv2fznm029vfb5ch-python3-3.7.3/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
self.run()
File "/nix/store/xskfz2hipjk67q6zxv2fznm029vfb5ch-python3-3.7.3/lib/python3.7/multiprocessing/process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "/nix/store/xskfz2hipjk67q6zxv2fznm029vfb5ch-python3-3.7.3/lib/python3.7/multiprocessing/managers.py", line 569, in _run_server
server = cls._Server(registry, address, authkey, serializer)
File "/nix/store/xskfz2hipjk67q6zxv2fznm029vfb5ch-python3-3.7.3/lib/python3.7/multiprocessing/managers.py", line 145, in __init__
self.listener = Listener(address=address, backlog=16)
File "/nix/store/xskfz2hipjk67q6zxv2fznm029vfb5ch-python3-3.7.3/lib/python3.7/multiprocessing/connection.py", line 438, in __init__
self._listener = SocketListener(address, family, backlog)
File "/nix/store/xskfz2hipjk67q6zxv2fznm029vfb5ch-python3-3.7.3/lib/python3.7/multiprocessing/connection.py", line 581, in __init__
self._socket.bind(address)
OSError: AF_UNIX path too long
Aborted!
builder for '/nix/store/02cipjqdd7510hpqxs8x8v9ka5f8jwmf-python3.7-pypi2nix-2.0.0.drv' failed with exit code 1
On mojave:
system: "x86_64-darwin",
multi-user?: no, version: nix-env (Nix) 2.1.3, channels(): "darwin, nixpkgs-19.09pre180301.650a295621b"
Hi, unfortunately I do not have the slightest idea of what is going on there and I also do not own an apple computer. sorry :(
I haven't had a chance to dig into this too deeply, but the error is caused by using Black's --diff
flag. If I remove that from checkPhase
, I'm able to install the latest version of master. Also of note: Black runs successfully with
nix-shell --command 'black --check --diff -v setup.py src/ integrationtests/ unittests/'
The problem only occurs during installation.
Edit: Python's multiprocessing
module places socket files inside $TMP
. I think this is causing the filenames to be too long for macOS. I added echo $TMP
to checkPhase
and got
/private/var/folders/2h/bmljv4c57hjbqdf7v5938qnr0000gn/T/nix-build-python3.7-pypi2nix-2.0.0.drv-0
With nix-shell --command 'echo $TMP'
I get the much shorter
/var/folders/2h/bmljv4c57hjbqdf7v5938qnr0000gn/T/