Added libPackages

This commit is contained in:
Jan-Bulthuis committed 2025-02-10 00:31:08 +01:00
1 parent 299813134e
commit e1d061ffbf
2 files changed
+15 -2

No files matched your search

+5 -2
View File
@@ -32,9 +32,12 @@ in
};
}).config;
recUpdate = nixpkgs.lib.recursiveUpdate;
libPackages = evaluated.libPackages pkgs;
shell = recUpdate {
env = evaluated.env;
packages = evaluated.packages ++ (evaluated.extraPackages pkgs);
env = evaluated.env // {
LD_LIBRARY_PATH = (nixpkgs.lib.mkIf (libPackages != [ ]) (nixpkgs.lib.makeLibraryPath libPackages));
};
packages = evaluated.packages ++ (evaluated.extraPackages pkgs) ++ libPackages;
} evaluated.override;
in
{
+10
View File
@@ -24,6 +24,16 @@ with lib;
description = "Extra packages to install";
};
libPackages = mkOption {
type = types.functionTo (types.listOf types.package) // {
merge =
loc: defs: p:
lib.concatMap (def: (def.value p)) defs;
};
default = p: [ ];
description = "Packages to install and add to library path";
};
override = mkOption {
type = types.attrs;
default = { };