mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +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
17
overlays.nix
17
overlays.nix
|
|
@ -26,6 +26,7 @@ in
|
||||||
description = "Wether to enable CPU-specific optimizations for some packages or not";
|
description = "Wether to enable CPU-specific optimizations for some packages or not";
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
traceCallPackage = mkEnableOption "printing package names each time callPackage is evaluated";
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
nix.nixPath =
|
nix.nixPath =
|
||||||
|
|
@ -36,12 +37,20 @@ in
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = []
|
||||||
(self: super: {
|
++ [(self: super: {
|
||||||
inherit unstable;
|
inherit unstable;
|
||||||
inherit nur;
|
inherit nur;
|
||||||
})
|
})]
|
||||||
(self: super: {
|
++ 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: {
|
htop = super.htop.overrideAttrs (old: {
|
||||||
configureFlags = old.configureFlags ++ [
|
configureFlags = old.configureFlags ++ [
|
||||||
"--enable-hwloc"
|
"--enable-hwloc"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue