mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
meta.sourceProvenance: inline hasSourceProvenance
it may be what the license handling code does, but it's confusing and not very useful Co-authored-by: Adam Joseph <54836058+a-m-joseph@users.noreply.github.com>
This commit is contained in:
parent
7906ea6d9d
commit
5bb9bf4774
1 changed files with 1 additions and 3 deletions
|
@ -89,13 +89,11 @@ let
|
||||||
allowInsecurePredicate attrs ||
|
allowInsecurePredicate attrs ||
|
||||||
builtins.getEnv "NIXPKGS_ALLOW_INSECURE" == "1";
|
builtins.getEnv "NIXPKGS_ALLOW_INSECURE" == "1";
|
||||||
|
|
||||||
hasSourceProvenance = attrs:
|
|
||||||
attrs ? meta.sourceProvenance;
|
|
||||||
|
|
||||||
isNonSource = sourceTypes: lib.lists.any (t: !t.isSource) sourceTypes;
|
isNonSource = sourceTypes: lib.lists.any (t: !t.isSource) sourceTypes;
|
||||||
|
|
||||||
hasNonSourceProvenance = attrs:
|
hasNonSourceProvenance = attrs:
|
||||||
hasSourceProvenance attrs &&
|
(attrs ? meta.sourceProvenance) &&
|
||||||
isNonSource (lib.lists.toList attrs.meta.sourceProvenance);
|
isNonSource (lib.lists.toList attrs.meta.sourceProvenance);
|
||||||
|
|
||||||
# Allow granular checks to allow only some non-source-built packages
|
# Allow granular checks to allow only some non-source-built packages
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue