mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-18 14:28:15 +00:00
tests: central darwin stubbing
Until we can figure out how to resolve issue with stdenv. Makes it easier to revert when automatic stubbing is fixed for darwin stdenv
This commit is contained in:
parent
b74402e4e8
commit
b3e11ed4a9
1 changed files with 64 additions and 3 deletions
|
@ -61,10 +61,71 @@ let
|
||||||
};
|
};
|
||||||
in outer;
|
in outer;
|
||||||
|
|
||||||
|
darwinBlacklist = let
|
||||||
|
# List of packages that need to be scrubbed on Darwin
|
||||||
|
# Packages are scrubbed in linux and expected in test output
|
||||||
|
packagesToScrub = [
|
||||||
|
"alot"
|
||||||
|
"antidote"
|
||||||
|
"atuin"
|
||||||
|
"bash-completion"
|
||||||
|
"carapace"
|
||||||
|
"delta"
|
||||||
|
"direnv"
|
||||||
|
"espanso"
|
||||||
|
"gh"
|
||||||
|
"ghostty"
|
||||||
|
"gnupg"
|
||||||
|
"granted"
|
||||||
|
"i3status"
|
||||||
|
"kitty"
|
||||||
|
"lesspipe"
|
||||||
|
"mu"
|
||||||
|
"msmtp"
|
||||||
|
"nheko"
|
||||||
|
"nix"
|
||||||
|
"nix-index"
|
||||||
|
"nix-your-shell"
|
||||||
|
"ollama"
|
||||||
|
"openstackclient"
|
||||||
|
"papis"
|
||||||
|
"pay-respects"
|
||||||
|
"pls"
|
||||||
|
"pyenv"
|
||||||
|
"sagemath"
|
||||||
|
"scmpuff"
|
||||||
|
"sm64ex"
|
||||||
|
"thefuck"
|
||||||
|
"wezterm"
|
||||||
|
"yubikey-agent"
|
||||||
|
"zellij"
|
||||||
|
"zplug"
|
||||||
|
];
|
||||||
|
|
||||||
|
inner = self: super:
|
||||||
|
lib.mapAttrs (name: value:
|
||||||
|
if lib.elem name packagesToScrub then
|
||||||
|
# Apply scrubbing to this specific package
|
||||||
|
scrubDerivation name value
|
||||||
|
else
|
||||||
|
value) super;
|
||||||
|
|
||||||
|
outer = self: super:
|
||||||
|
inner self super // {
|
||||||
|
buildPackages = super.buildPackages.extend inner;
|
||||||
|
};
|
||||||
|
in outer;
|
||||||
|
|
||||||
scrubbedPkgs =
|
scrubbedPkgs =
|
||||||
let rawScrubbedPkgs = lib.makeExtensible (final: scrubDerivations pkgs);
|
# TODO: fix darwin stdenv stubbing
|
||||||
in builtins.traceVerbose "eval scrubbed nixpkgs"
|
if isDarwin then
|
||||||
(rawScrubbedPkgs.extend whitelist);
|
let rawPkgs = lib.makeExtensible (final: pkgs);
|
||||||
|
in builtins.traceVerbose "eval scrubbed darwin nixpkgs"
|
||||||
|
(rawPkgs.extend darwinBlacklist)
|
||||||
|
else
|
||||||
|
let rawScrubbedPkgs = lib.makeExtensible (final: scrubDerivations pkgs);
|
||||||
|
in builtins.traceVerbose "eval scrubbed nixpkgs"
|
||||||
|
(rawScrubbedPkgs.extend whitelist);
|
||||||
|
|
||||||
modules = import ../modules/modules.nix {
|
modules = import ../modules/modules.nix {
|
||||||
inherit lib pkgs;
|
inherit lib pkgs;
|
||||||
|
|
Loading…
Add table
Reference in a new issue