summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/build-support/fetchurl/default.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix
index c65738aef41..8ce69a7f187 100644
--- a/pkgs/build-support/fetchurl/default.nix
+++ b/pkgs/build-support/fetchurl/default.nix
@@ -104,7 +104,9 @@ let
     if urls != [] && url == "" then
       (if lib.isList urls then urls
        else throw "`urls` is not a list")
-    else if urls == [] && url != "" then [url]
+    else if urls == [] && url != "" then
+      (if lib.isString url then [url]
+       else throw "`url` is not a string")
     else throw "fetchurl requires either `url` or `urls` to be set";
 
   hash_ =