Merge pull request #118283 from vcunat/p/fetchurl-typecheck

This commit is contained in:
Sandro 2021-04-02 00:24:43 +02:00 committed by GitHub
commit 9bbfb26854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -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_ =

View file

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
# fix "unescaped left brace" errors when using intltool in some cases
patches = [(fetchpatch {
name = "perl5.26-regex-fixes.patch";
url = [
urls = [
"https://sources.debian.org/data/main/i/intltool/0.51.0-5/debian/patches/perl5.26-regex-fixes.patch"
"https://src.fedoraproject.org/rpms/intltool/raw/d8d2ef29fb122a42a6b6678eb1ec97ae56902af2/f/intltool-perl5.26-regex-fixes.patch"
];