mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
Merge pull request #41764 from oxij/nixos/some-more-related-packages
nixos: add some more related packages
This commit is contained in:
commit
f35cc5eb42
@ -31,11 +31,12 @@ let
|
||||
else p;
|
||||
describe = args:
|
||||
let
|
||||
title = args.title or null;
|
||||
name = args.name or (lib.concatStringsSep "." args.path);
|
||||
path = args.path or [ args.name ];
|
||||
package = args.package or (lib.attrByPath path (throw "Invalid package attribute path `${toString path}'") pkgs);
|
||||
in "<listitem>"
|
||||
+ "<para><literal>pkgs.${name} (${package.meta.name})</literal>"
|
||||
+ "<para><literal>${lib.optionalString (title != null) "${title} aka "}pkgs.${name} (${package.meta.name})</literal>"
|
||||
+ lib.optionalString (!package.meta.available) " <emphasis>[UNAVAILABLE]</emphasis>"
|
||||
+ ": ${package.meta.description or "???"}.</para>"
|
||||
+ lib.optionalString (args ? comment) "\n<para>${args.comment}</para>"
|
||||
@ -51,7 +52,7 @@ let
|
||||
// lib.optionalAttrs (opt ? example) { example = substFunction opt.example; }
|
||||
// lib.optionalAttrs (opt ? default) { default = substFunction opt.default; }
|
||||
// lib.optionalAttrs (opt ? type) { type = substFunction opt.type; }
|
||||
// lib.optionalAttrs (opt ? relatedPackages) { relatedPackages = genRelatedPackages opt.relatedPackages; });
|
||||
// lib.optionalAttrs (opt ? relatedPackages && opt.relatedPackages != []) { relatedPackages = genRelatedPackages opt.relatedPackages; });
|
||||
|
||||
# We need to strip references to /nix/store/* from options,
|
||||
# including any `extraSources` if some modules came from elsewhere,
|
||||
|
@ -244,6 +244,13 @@ in
|
||||
"ati_unfree" "amdgpu" "amdgpu-pro"
|
||||
"nv" "nvidia" "nvidiaLegacy340" "nvidiaLegacy304"
|
||||
];
|
||||
# TODO(@oxij): think how to easily add the rest, like those nvidia things
|
||||
relatedPackages = concatLists
|
||||
(mapAttrsToList (n: v:
|
||||
optional (hasPrefix "xf86video" n) {
|
||||
path = [ "xorg" n ];
|
||||
title = removePrefix "xf86video" n;
|
||||
}) pkgs.xorg);
|
||||
description = ''
|
||||
The names of the video drivers the configuration
|
||||
supports. They will be tried in order until one that
|
||||
|
Loading…
Reference in New Issue
Block a user