diff options
author | Nikolay Amiantov <ab@fmap.me> | 2017-05-27 20:44:00 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2017-06-04 00:57:45 +0300 |
commit | 2d0a7c4eeecd22f26eb37f6077a0397c32250375 (patch) | |
tree | b1e585fb4e65e80b97bef26f1b8bd3febc10d536 | |
parent | addb96c323c1d2e0cb880907d9be08e663706f6a (diff) | |
download | nixpkgs-2d0a7c4eeecd22f26eb37f6077a0397c32250375.tar nixpkgs-2d0a7c4eeecd22f26eb37f6077a0397c32250375.tar.gz nixpkgs-2d0a7c4eeecd22f26eb37f6077a0397c32250375.tar.bz2 nixpkgs-2d0a7c4eeecd22f26eb37f6077a0397c32250375.tar.lz nixpkgs-2d0a7c4eeecd22f26eb37f6077a0397c32250375.tar.xz nixpkgs-2d0a7c4eeecd22f26eb37f6077a0397c32250375.tar.zst nixpkgs-2d0a7c4eeecd22f26eb37f6077a0397c32250375.zip |
aliases: don't distribute on Hydra
-rw-r--r-- | lib/meta.nix | 5 | ||||
-rw-r--r-- | pkgs/top-level/aliases.nix | 17 |
2 files changed, 17 insertions, 5 deletions
diff --git a/lib/meta.nix b/lib/meta.nix index ae652e579c3..8f77bbe0148 100644 --- a/lib/meta.nix +++ b/lib/meta.nix @@ -17,6 +17,11 @@ rec { drv // { meta = (drv.meta or {}) // newAttrs; }; + /* Disable Hydra builds of given derivation. + */ + dontDistribute = drv: addMetaAttrs { hydraPlatforms = []; } drv; + + /* Change the symbolic name of a package for presentation purposes (i.e., so that nix-env users can tell them apart). */ diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 7fb271682d0..a14732fb859 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -5,18 +5,25 @@ with self; let # Removing recurseForDerivation prevents derivations of aliased attribute # set to appear while listing all the packages available. - removeRecurseForDerivations = _n: alias: with lib; + removeRecurseForDerivations = alias: with lib; if alias.recurseForDerivations or false then removeAttrs alias ["recurseForDerivations"] else alias; - doNotDisplayTwice = aliases: - lib.mapAttrs removeRecurseForDerivations aliases; + # 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; + + mapAliases = aliases: + lib.mapAttrs (n: alias: removeDistribute (removeRecurseForDerivations alias)) aliases; in ### Deprecated aliases - for backward compatibility -doNotDisplayTwice rec { +mapAliases (rec { accounts-qt = libsForQt5.accounts-qt; # added 2015-12-19 adobeReader = adobe-reader; aircrackng = aircrack-ng; # added 2016-01-14 @@ -156,4 +163,4 @@ doNotDisplayTwice rec { ocaml_4_02 = ocamlPackages_4_02.ocaml; ocaml_4_03 = ocamlPackages_4_03.ocaml; ocaml = ocamlPackages.ocaml; -}) +})) |