mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Overlays] Add option to trace callPackage
This commit is contained in:
parent
d25edca6c4
commit
52407e3f4e
1 changed files with 15 additions and 6 deletions
21
overlays.nix
21
overlays.nix
|
|
@ -26,6 +26,7 @@ in
|
|||
description = "Wether to enable CPU-specific optimizations for some packages or not";
|
||||
type = types.bool;
|
||||
};
|
||||
traceCallPackage = mkEnableOption "printing package names each time callPackage is evaluated";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
nix.nixPath =
|
||||
|
|
@ -36,12 +37,20 @@ in
|
|||
;
|
||||
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
inherit unstable;
|
||||
inherit nur;
|
||||
})
|
||||
(self: super: {
|
||||
nixpkgs.overlays = []
|
||||
++ [(self: super: {
|
||||
inherit unstable;
|
||||
inherit nur;
|
||||
})]
|
||||
++ optional cfg.traceCallPackage [(self: super: {
|
||||
callPackage = path: overrides:
|
||||
let
|
||||
_pkg = super.callPackage path overrides;
|
||||
_name = _pkg.name or _pkg.pname or "<unknown>";
|
||||
in trace "callPackage ${_name}" _pkg
|
||||
;
|
||||
})]
|
||||
++ [(self: super: {
|
||||
htop = super.htop.overrideAttrs (old: {
|
||||
configureFlags = old.configureFlags ++ [
|
||||
"--enable-hwloc"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue