release-cross: Factor out system filtering
This commit is contained in:
parent
db0dbd0b81
commit
916012121c
@ -46,21 +46,22 @@ rec {
|
|||||||
interested in the result of cross building a package. */
|
interested in the result of cross building a package. */
|
||||||
crossMaintainers = [ maintainers.viric ];
|
crossMaintainers = [ maintainers.viric ];
|
||||||
|
|
||||||
|
forAllSupportedSystems = systems: f:
|
||||||
|
genAttrs (filter (x: elem x supportedSystems) systems) f;
|
||||||
|
|
||||||
/* Build a package on the given set of platforms. The function `f'
|
/* Build a package on the given set of platforms. The function `f'
|
||||||
is called for each supported platform with Nixpkgs for that
|
is called for each supported platform with Nixpkgs for that
|
||||||
platform as an argument . We return an attribute set containing
|
platform as an argument . We return an attribute set containing
|
||||||
a derivation for each supported platform, i.e. ‘{ x86_64-linux =
|
a derivation for each supported platform, i.e. ‘{ x86_64-linux =
|
||||||
f pkgs_x86_64_linux; i686-linux = f pkgs_i686_linux; ... }’. */
|
f pkgs_x86_64_linux; i686-linux = f pkgs_i686_linux; ... }’. */
|
||||||
testOn = systems: f: genAttrs
|
testOn = systems: f: forAllSupportedSystems systems
|
||||||
(filter (x: elem x supportedSystems) systems) (system: hydraJob' (f (pkgsFor system)));
|
(system: hydraJob' (f (pkgsFor system)));
|
||||||
|
|
||||||
|
|
||||||
/* Similar to the testOn function, but with an additional
|
/* Similar to the testOn function, but with an additional
|
||||||
'crossSystem' parameter for allPackages, defining the target
|
'crossSystem' parameter for allPackages, defining the target
|
||||||
platform for cross builds. */
|
platform for cross builds. */
|
||||||
testOnCross = crossSystem: systems: f: genAttrs
|
testOnCross = crossSystem: systems: f: forAllSupportedSystems systems
|
||||||
(filter (x: elem x supportedSystems) systems)
|
|
||||||
(system: hydraJob' (f (allPackages { inherit system crossSystem; })));
|
(system: hydraJob' (f (allPackages { inherit system crossSystem; })));
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user