aliases: don't distribute on Hydra
This commit is contained in:
parent
addb96c323
commit
2d0a7c4eee
|
@ -17,6 +17,11 @@ rec {
|
||||||
drv // { meta = (drv.meta or {}) // newAttrs; };
|
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
|
/* Change the symbolic name of a package for presentation purposes
|
||||||
(i.e., so that nix-env users can tell them apart).
|
(i.e., so that nix-env users can tell them apart).
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,18 +5,25 @@ with self;
|
||||||
let
|
let
|
||||||
# Removing recurseForDerivation prevents derivations of aliased attribute
|
# Removing recurseForDerivation prevents derivations of aliased attribute
|
||||||
# set to appear while listing all the packages available.
|
# set to appear while listing all the packages available.
|
||||||
removeRecurseForDerivations = _n: alias: with lib;
|
removeRecurseForDerivations = alias: with lib;
|
||||||
if alias.recurseForDerivations or false then
|
if alias.recurseForDerivations or false then
|
||||||
removeAttrs alias ["recurseForDerivations"]
|
removeAttrs alias ["recurseForDerivations"]
|
||||||
else alias;
|
else alias;
|
||||||
|
|
||||||
doNotDisplayTwice = aliases:
|
# Disabling distribution prevents top-level aliases for non-recursed package
|
||||||
lib.mapAttrs removeRecurseForDerivations aliases;
|
# 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
|
in
|
||||||
|
|
||||||
### Deprecated aliases - for backward compatibility
|
### Deprecated aliases - for backward compatibility
|
||||||
|
|
||||||
doNotDisplayTwice rec {
|
mapAliases (rec {
|
||||||
accounts-qt = libsForQt5.accounts-qt; # added 2015-12-19
|
accounts-qt = libsForQt5.accounts-qt; # added 2015-12-19
|
||||||
adobeReader = adobe-reader;
|
adobeReader = adobe-reader;
|
||||||
aircrackng = aircrack-ng; # added 2016-01-14
|
aircrackng = aircrack-ng; # added 2016-01-14
|
||||||
|
@ -156,4 +163,4 @@ doNotDisplayTwice rec {
|
||||||
ocaml_4_02 = ocamlPackages_4_02.ocaml;
|
ocaml_4_02 = ocamlPackages_4_02.ocaml;
|
||||||
ocaml_4_03 = ocamlPackages_4_03.ocaml;
|
ocaml_4_03 = ocamlPackages_4_03.ocaml;
|
||||||
ocaml = ocamlPackages.ocaml;
|
ocaml = ocamlPackages.ocaml;
|
||||||
})
|
}))
|
||||||
|
|
Loading…
Reference in New Issue