Skip to content

Commit 8a98ba4

Browse files
authored
nix: fix allowUnfreePredicate for packages with multiple licenses (ggml-org#19237)
The allowUnfreePredicate in pkgsCuda was wrapping p.meta.license in a list unconditionally. This fails when meta.license is already a list of licenses, as it creates a nested list and then tries to access .free and .shortName on the inner list. Use lib.toList instead, which correctly handles both cases: - Single license attrset -> wraps in list - List of licenses -> returns unchanged
1 parent 2634ed2 commit 8a98ba4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.devops/nix/nixpkgs-instances.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# the module `{ pkgs ... }: { /* config */ }` implicitly uses
55
# `_module.args.pkgs` (defined in this case by flake-parts).
66
perSystem =
7-
{ system, ... }:
7+
{ lib, system, ... }:
88
{
99
_module.args = {
1010
# Note: bringing up https://zimbatm.com/notes/1000-instances-of-nixpkgs
@@ -33,7 +33,7 @@
3333
"CUDA EULA"
3434
"cuDNN EULA"
3535
]
36-
) (p.meta.licenses or [ p.meta.license ]);
36+
) (p.meta.licenses or (lib.toList p.meta.license));
3737
};
3838
# Ensure dependencies use ROCm consistently
3939
pkgsRocm = import inputs.nixpkgs {

0 commit comments

Comments
 (0)