Curl: (3) URL rejected: Malformed input to a URL function


I was trying to install DaVinci Resolve and this is the message I get

curl: (3) URL rejected: Malformed input to a URL function

There are some additional errors:

error: builder for '/nix/store/' failed with exit code 3;
       last 1 log lines:
       > curl: (3) URL rejected: Malformed input to a URL function
       For full logs, run 'nix log /nix/store/'.
error: 1 dependencies of derivation '/nix/store/zapsdicg4p2s09xdgb84f1v8q1dkmwh7-davinci-resolve-17.4.3.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5w2kpbdlfn3iqacn3j0h3gl1hih7sqzz-davinci-wrapper.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fsbfaq12bv503lqgvwzb95mqjx2yq6p1-davinci-resolve-init.drv' failed to build
error (ignored): error: cannot unlink '/tmp/nix-build-python-': Directory not empty
error: 1 dependencies of derivation '/nix/store/9infq8vqhcm3jz7zly6yi3l60z9sz7gh-davinci-resolve-bwrap.drv' failed to build
error: 1 dependencies of derivation '/nix/store/iqrzmz4vsbj33f49sw1lh3ynbjbi3ckw-davinci-resolve.drv' failed to build

Now, I tried to run the nix log command, and with some searching I did get this

nix log /nix/store/ --extra-experimental-features nix-command --extra-experimental-features flakes
curl: (3) URL rejected: Malformed input to a URL function

So there is nothing new. DaVinci is crucial for me, so I would appreciate any kind of help. However if should you know of any alternative installation on NixOS i would love to know that.

1 Like

The source download function is really complex, and it even includes inpure environment variables. No wonder this isn’t working:

Seems it creates a variable that contains the URL to download, and it uses runCommandLocal so if this ever breaks upstream won’t know to fix it. If you are on an IP that something like cloudflare doesn’t like, this will likely break with the error you see too.

My suggestion is to download the source by hand, and add it to the nix store with:

nix-store --add-fixed sha256 <filename>

After that you should be able to try again and it should work. Honestly this package should prompt you to do that instead of running this rube goldberg machine.

1 Like

Thanks for the response. I will check that as soon as I can

As I understand you correctly - You want me to download that file (default.nix) and try using this command on it, is that so?

If yes then I renamed that file to “DavinciResolve.nix” for clearance and run that command:

nix-store --add-fixed sha256 /home/sheeper/Downloads/DavinciResolve.nix

Which resulted in this output:


After that I tried installing it. Didn’t know exactly what to do so I used this command:

nix-env -i /nix/store/q8lpr330ib3rgx99ml40i4gnd1476d9w-DavinciResolve.nix
installing 'DavinciResolve.nix'

Which causes this output:

building '/nix/store/fg84744rvgwf5138h6s4vl3184a42x8z-user-environment.drv'...
warning: not including '/nix/store/q8lpr330ib3rgx99ml40i4gnd1476d9w-DavinciResolve.nix' in the user environment because it's not a directory

Now, I am still kind of new to linux systems and especially to NixOS so it might just be me being dumb and not fully understanding what to do. Would love to get some more information about that.

No. I want you to download the source code (or I guess the unpatched binary blob, whatever is used as the source for this package) of DaVinci Resolve by hand.

The nix package clearly tries to work around a non-redistributable license, and utterly fails to circumvent DaVinci Resolve’s website’s protections against automated downloads.

To work around this problem, nix has a feature where you can just add the required files to the nix store by hand, at which point nix will see that it’s already in the store and not try to download it again when you install your system as normal, so you never run curl and don’t get this error.

I can’t give you an exact download link, it’s heavily obfuscated and I know next to nothing about DaVinci Resolve, but you’ll probably find it somewhere here: DaVinci Resolve 18 | Blackmagic Design

After you’ve added the correct file to the store, you just need to run the same command you ran when you got that curl error to see if it’s working. If not, the version you got may be incorrect, or the package too outdated to work out of the box, and we’ll need to try and debug the package a bit.

That said, this may be far too difficult for you in the long term. @davidak is also still active around here I think, according to the commit logs they’ve at least built the package before. Maybe they know why the download fails today?

This issue was already reported in the Github issue tracker:

It was fixed by #246647, but the backport for stable failed. You could use the package from unstable if you don’t mind a major update.

In general, please see the official issue tracker for problems with packages and report them, if no issue already exist and tag the package maintainer (it’s actually not me here :smile:).


My bad, I completely overlooked that issue o\

1 Like