NixOS-matlab icon indicating copy to clipboard operation
NixOS-matlab copied to clipboard

Issue with curl

Open bbarker opened this issue 6 years ago • 0 comments

I've had trouble in the past with curl on nix - but curl itself works fine on the file, as shown below.

I modified default.nix slightly to use a different installer directory, but I don't think that is the issue here (url = "file:///mnt/matlab_tmp_installer/${filename}";).

$ nix-build default.nix 
these derivations will be built:
  /nix/store/yn5jlvn98q1b28q0x74in5iqf58djhvw-MATLAB-Linux64.tar.drv
  /nix/store/pkfppk8wfy3bgby80d7p6x86whdi37q5-matlab-R2018a.drv
these paths will be fetched (0.01 MiB download, 0.04 MiB unpacked):
  /nix/store/hyl91rxgq513w0sb22ndqg9pklsv2jml-gcc-wrapper-4.8.5
copying path '/nix/store/hyl91rxgq513w0sb22ndqg9pklsv2jml-gcc-wrapper-4.8.5' from 'https://cache.nixos.org'...
building '/nix/store/yn5jlvn98q1b28q0x74in5iqf58djhvw-MATLAB-Linux64.tar.drv'...

trying file:///mnt/matlab_tmp_installer/MATLAB-Linux64.tar
curl: (37) Couldn't open file /mnt/matlab_tmp_installer/MATLAB-Linux64.tar
error: cannot download MATLAB-Linux64.tar from any mirror
builder for '/nix/store/yn5jlvn98q1b28q0x74in5iqf58djhvw-MATLAB-Linux64.tar.drv' failed with exit code 1
cannot build derivation '/nix/store/pkfppk8wfy3bgby80d7p6x86whdi37q5-matlab-R2018a.drv': 1 dependencies couldn't be built
error: build of '/nix/store/pkfppk8wfy3bgby80d7p6x86whdi37q5-matlab-R2018a.drv' failed

$ ls -last /mnt/matlab_tmp_installer/MATLAB-Linux64.tar
12458764 -rw-r--r-- 1 root root 12757770240 Dec 12 01:02 /mnt/matlab_tmp_installer/MATLAB-Linux64.tar

$ cd /tmp

$ curl /mnt/matlab_tmp_installer/MATLAB-Linux64.tar > /dev/null
curl: (3) URL using bad/illegal format or missing URL

$ curl file:///mnt/matlab_tmp_installer/MATLAB-Linux64.tar > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  2 11.8G    2  333M    0     0   164M      0  0:01:13  0:00:02  0:01:11  165M^C

bbarker avatar Feb 06 '19 18:02 bbarker