From 095eb9153381d240e2ba3e05716b3ce7fda85080 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Fri, 20 May 2022 19:03:04 +0100 Subject: [PATCH] meta.sourceProvenance: disallow string values strings complicate reasoning about values and may not be needed with `sourceProvenance` Co-authored-by: Alexander Foremny --- pkgs/stdenv/generic/check-meta.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 1be306fd3969..5252711c8ca0 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -92,7 +92,7 @@ let hasSourceProvenance = attrs: attrs ? meta.sourceProvenance; - isNonSource = sourceTypes: lib.lists.any (t: !t.isSource or true) sourceTypes; + isNonSource = sourceTypes: lib.lists.any (t: !t.isSource) sourceTypes; hasNonSourceProvenance = attrs: hasSourceProvenance attrs && @@ -260,7 +260,7 @@ let downloadPage = str; changelog = either (listOf str) str; license = either (listOf lib.types.attrs) (either lib.types.attrs str); - sourceProvenance = either (listOf lib.types.attrs) (either lib.types.attrs str); + sourceProvenance = either (listOf lib.types.attrs) lib.types.attrs; maintainers = listOf (attrsOf str); priority = int; platforms = listOf str;