Move tweakAlias function into the aliases.nix file, and rename it.

This commit is contained in:
Nicolas B. Pierron 2016-03-20 14:50:27 +00:00
parent f7c86ee018
commit 0b67f7cb5d
2 changed files with 14 additions and 7 deletions

View File

@ -2,9 +2,21 @@ self:
with self;
let
# Removind recurseForDerivation prevents derivations of aliased attribute
# set to appear while listing all the packages available.
removeRecurseForDerivations = _n: alias: with lib;
if alias.recurseForDerivations or false then
removeAttrs alias ["recurseForDerivations"]
else alias;
doNotDisplayTwice = aliases:
lib.mapAttrs removeRecurseForDerivations aliases;
in
### Deprecated aliases - for backward compatibility
rec {
doNotDisplayTwice rec {
accounts-qt = qt5.accounts-qt; # added 2015-12-19
adobeReader = adobe-reader;
aircrackng = aircrack-ng; # added 2016-01-14

View File

@ -16474,13 +16474,8 @@ let
aliases = import ./aliases.nix self;
tweakAlias = _n: alias: with lib;
if alias.recurseForDerivations or false then
removeAttrs alias ["recurseForDerivations"]
else alias;
in
lib.mapAttrs tweakAlias aliases // helperFunctions // stdenvDefault // self // overrides;
aliases // helperFunctions // stdenvDefault // self // overrides;
in
pkgs