mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
tests/darwinScrublist: move darwin scrub list to new file
Getting larger, can move to new file to reduce clutter in default
This commit is contained in:
170
tests/darwinScrublist.nix
Normal file
170
tests/darwinScrublist.nix
Normal file
@@ -0,0 +1,170 @@
|
||||
{ lib, scrubDerivation }:
|
||||
|
||||
let
|
||||
# List of packages that need to be scrubbed on Darwin
|
||||
# Packages are scrubbed on Linux and expected in test output
|
||||
packagesToScrub = [
|
||||
"aerc"
|
||||
"aerospace"
|
||||
"alacritty"
|
||||
"alot"
|
||||
"antidote"
|
||||
"aria2"
|
||||
"atuin"
|
||||
"autojump"
|
||||
"bacon"
|
||||
"bash"
|
||||
"bashInteractive"
|
||||
"bash-completion"
|
||||
"bash-preexec"
|
||||
"bat"
|
||||
"borgmatic"
|
||||
"bottom"
|
||||
"broot"
|
||||
"browserpass"
|
||||
"btop"
|
||||
"carapace"
|
||||
"cava"
|
||||
"cmus"
|
||||
"comodoro"
|
||||
"darcs"
|
||||
"dircolors"
|
||||
"delta"
|
||||
"direnv"
|
||||
"earthly"
|
||||
"emacs"
|
||||
"espanso"
|
||||
"fastfetch"
|
||||
"feh"
|
||||
"fzf"
|
||||
"gallery-dl"
|
||||
"gh"
|
||||
"gh-dash"
|
||||
"ghostty"
|
||||
"git"
|
||||
"git-cliff"
|
||||
"git-credential-oauth"
|
||||
"git-worktree-switcher"
|
||||
"gnupg"
|
||||
"go"
|
||||
"granted"
|
||||
"helix"
|
||||
"himalaya"
|
||||
"hjson-go"
|
||||
"htop"
|
||||
"hyfetch"
|
||||
"i3status"
|
||||
"irssi"
|
||||
"jankyborders"
|
||||
"jujutsu"
|
||||
"joplin-desktop"
|
||||
"jqp"
|
||||
"k9s"
|
||||
"kakoune"
|
||||
"khal"
|
||||
"khard"
|
||||
"kitty"
|
||||
"kubecolor"
|
||||
"lapce"
|
||||
"lazydocker"
|
||||
"lazygit"
|
||||
"ledger"
|
||||
"less"
|
||||
"lesspipe"
|
||||
"lf"
|
||||
"lsd"
|
||||
"lieer"
|
||||
"mbsync"
|
||||
"mergiraf"
|
||||
"micro"
|
||||
"mise"
|
||||
"mpv"
|
||||
"mu"
|
||||
"mujmap"
|
||||
"msmtp"
|
||||
"ne"
|
||||
"neomutt"
|
||||
"neovide"
|
||||
"neovim"
|
||||
"nheko"
|
||||
"nix"
|
||||
"nix-index"
|
||||
"nix-your-shell"
|
||||
"notmuch"
|
||||
"npth"
|
||||
"nushell"
|
||||
"ollama"
|
||||
"onlyoffice-desktopeditors"
|
||||
"openstackclient"
|
||||
"papis"
|
||||
"pay-respects"
|
||||
"pet"
|
||||
"pistol"
|
||||
"pls"
|
||||
"poetry"
|
||||
"powerline-go"
|
||||
"pubs"
|
||||
"pyenv"
|
||||
"qcal"
|
||||
"qutebrowser"
|
||||
"ranger"
|
||||
"rio"
|
||||
"ripgrep"
|
||||
"ruff"
|
||||
"sage"
|
||||
"sapling"
|
||||
"sbt"
|
||||
"scmpuff"
|
||||
"senpai"
|
||||
"sftpman"
|
||||
"sioyek"
|
||||
"skhd"
|
||||
"sm64ex"
|
||||
"smug"
|
||||
"spotify-player"
|
||||
"starship"
|
||||
"taskwarrior"
|
||||
"tealdeer"
|
||||
"texlive"
|
||||
"thefuck"
|
||||
"thunderbird"
|
||||
"tmate"
|
||||
"tmux"
|
||||
"topgrade"
|
||||
"translate-shell"
|
||||
"vifm"
|
||||
"vim-vint"
|
||||
"vimPlugins"
|
||||
"vscode"
|
||||
"wallust"
|
||||
"watson"
|
||||
"wezterm"
|
||||
"yazi"
|
||||
"yq-go"
|
||||
"yubikey-agent"
|
||||
"zed-editor"
|
||||
"zellij"
|
||||
"zk"
|
||||
"zoxide"
|
||||
"zplug"
|
||||
"zsh"
|
||||
];
|
||||
|
||||
# Create an overlay that scrubs packages in the scrublist
|
||||
packageScrubOverlay =
|
||||
self: super:
|
||||
lib.mapAttrs (
|
||||
name: value:
|
||||
if lib.elem name packagesToScrub then
|
||||
# Apply scrubbing to this specific package
|
||||
scrubDerivation name value
|
||||
else
|
||||
value
|
||||
) super;
|
||||
|
||||
in
|
||||
self: super:
|
||||
packageScrubOverlay self super
|
||||
// {
|
||||
buildPackages = super.buildPackages.extend packageScrubOverlay;
|
||||
}
|
||||
@@ -81,176 +81,7 @@ let
|
||||
outer;
|
||||
|
||||
# TODO: figure out stdenv stubbing so we don't have to do this
|
||||
darwinBlacklist =
|
||||
let
|
||||
# List of packages that need to be scrubbed on Darwin
|
||||
# Packages are scrubbed in linux and expected in test output
|
||||
packagesToScrub = [
|
||||
"aerc"
|
||||
"aerospace"
|
||||
"alacritty"
|
||||
"alot"
|
||||
"antidote"
|
||||
"aria2"
|
||||
"atuin"
|
||||
"autojump"
|
||||
"bacon"
|
||||
"bash"
|
||||
"bashInteractive"
|
||||
"bash-completion"
|
||||
"bash-preexec"
|
||||
"bat"
|
||||
"borgmatic"
|
||||
"bottom"
|
||||
"broot"
|
||||
"browserpass"
|
||||
"btop"
|
||||
"carapace"
|
||||
"cava"
|
||||
"cmus"
|
||||
"comodoro"
|
||||
"darcs"
|
||||
"dircolors"
|
||||
"delta"
|
||||
"direnv"
|
||||
"earthly"
|
||||
"emacs"
|
||||
"espanso"
|
||||
"fastfetch"
|
||||
"feh"
|
||||
"fzf"
|
||||
"gallery-dl"
|
||||
"gh"
|
||||
"gh-dash"
|
||||
"ghostty"
|
||||
"git"
|
||||
"git-cliff"
|
||||
"git-credential-oauth"
|
||||
"git-worktree-switcher"
|
||||
"gnupg"
|
||||
"go"
|
||||
"granted"
|
||||
"helix"
|
||||
"himalaya"
|
||||
"hjson-go"
|
||||
"htop"
|
||||
"hyfetch"
|
||||
"i3status"
|
||||
"irssi"
|
||||
"jankyborders"
|
||||
"jujutsu"
|
||||
"joplin-desktop"
|
||||
"jqp"
|
||||
"k9s"
|
||||
"kakoune"
|
||||
"khal"
|
||||
"khard"
|
||||
"kitty"
|
||||
"kubecolor"
|
||||
"lapce"
|
||||
"lazydocker"
|
||||
"lazygit"
|
||||
"ledger"
|
||||
"less"
|
||||
"lesspipe"
|
||||
"lf"
|
||||
"lsd"
|
||||
"lieer"
|
||||
"mbsync"
|
||||
"mergiraf"
|
||||
"micro"
|
||||
"mise"
|
||||
"mpv"
|
||||
"mu"
|
||||
"mujmap"
|
||||
"msmtp"
|
||||
"ne"
|
||||
"neomutt"
|
||||
"neovide"
|
||||
"neovim"
|
||||
"nheko"
|
||||
"nix"
|
||||
"nix-index"
|
||||
"nix-your-shell"
|
||||
"notmuch"
|
||||
"npth"
|
||||
"nushell"
|
||||
"ollama"
|
||||
"onlyoffice-desktopeditors"
|
||||
"openstackclient"
|
||||
"papis"
|
||||
"pay-respects"
|
||||
"pet"
|
||||
"pistol"
|
||||
"pls"
|
||||
"poetry"
|
||||
"powerline-go"
|
||||
"pubs"
|
||||
"pyenv"
|
||||
"qcal"
|
||||
"qutebrowser"
|
||||
"ranger"
|
||||
"rio"
|
||||
"ripgrep"
|
||||
"ruff"
|
||||
"sage"
|
||||
"sapling"
|
||||
"sbt"
|
||||
"scmpuff"
|
||||
"senpai"
|
||||
"sftpman"
|
||||
"sioyek"
|
||||
"skhd"
|
||||
"sm64ex"
|
||||
"smug"
|
||||
"spotify-player"
|
||||
"starship"
|
||||
"taskwarrior"
|
||||
"tealdeer"
|
||||
"texlive"
|
||||
"thefuck"
|
||||
"thunderbird"
|
||||
"tmate"
|
||||
"tmux"
|
||||
"topgrade"
|
||||
"translate-shell"
|
||||
"vifm"
|
||||
"vim-vint"
|
||||
"vimPlugins"
|
||||
"vscode"
|
||||
"wallust"
|
||||
"watson"
|
||||
"wezterm"
|
||||
"yazi"
|
||||
"yq-go"
|
||||
"yubikey-agent"
|
||||
"zed-editor"
|
||||
"zellij"
|
||||
"zk"
|
||||
"zoxide"
|
||||
"zplug"
|
||||
"zsh"
|
||||
];
|
||||
|
||||
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;
|
||||
darwinScrublist = import ./darwinScrublist.nix { inherit lib scrubDerivation; };
|
||||
|
||||
scrubbedPkgs =
|
||||
# TODO: fix darwin stdenv stubbing
|
||||
@@ -258,7 +89,7 @@ let
|
||||
let
|
||||
rawPkgs = lib.makeExtensible (final: pkgs);
|
||||
in
|
||||
builtins.traceVerbose "eval scrubbed darwin nixpkgs" (rawPkgs.extend darwinBlacklist)
|
||||
builtins.traceVerbose "eval scrubbed darwin nixpkgs" (rawPkgs.extend darwinScrublist)
|
||||
else
|
||||
let
|
||||
rawScrubbedPkgs = lib.makeExtensible (final: scrubDerivations pkgs);
|
||||
|
||||
Reference in New Issue
Block a user