From 954c59fff976140ddc14b8e923eaafd7a5cc92e4 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 2 Jun 2024 16:49:37 +0200 Subject: [PATCH] top-level/aliases: Remove unneeded dontDistribute It is not necessary now that we no longer evaluate aliases on Hydra. It was introduced to prevent Hydra from using aliases as an entry point to recurse into attribute sets that are not recursible in all-packages.nix: https://github.com/NixOS/nixpkgs/commit/2d0a7c4eeecd22f26eb37f6077a0397c32250375 This removes four levels from the stack trace when trying to evaluate a removed alias that throws. Ideally, we would also remove the `removeRecurseForDerivations` but that is probably still needed for `nix-env`: https://github.com/NixOS/nixpkgs/commit/c10f7050c56ddbfb500ef5a73367f810438a8416 https://github.com/NixOS/nixpkgs/commit/0b67f7cb5dfc2b5080b8e3046917a0a15bb5140d --- pkgs/top-level/aliases.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 721d077e047c..9af190bd2178 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -27,13 +27,6 @@ let then removeAttrs alias [ "recurseForDerivations" ] else alias; - # Disabling distribution prevents top-level aliases for non-recursed package - # sets from building on Hydra. - removeDistribute = alias: with lib; - if isDerivation alias then - dontDistribute alias - else alias; - # Make sure that we are not shadowing something from all-packages.nix. checkInPkgs = n: alias: if builtins.hasAttr n super @@ -43,9 +36,8 @@ let mapAliases = aliases: lib.mapAttrs (n: alias: - removeDistribute - (removeRecurseForDerivations - (checkInPkgs n alias))) + removeRecurseForDerivations + (checkInPkgs n alias)) aliases; in