1
0
Fork 0
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:
Austin Horstman 2025-02-27 21:03:30 -05:00
parent b74402e4e8
commit b3e11ed4a9

View file

@ -61,7 +61,68 @@ let
};
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 =
# TODO: fix darwin stdenv stubbing
if isDarwin then
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);