Build overriden python packages too

This commit is contained in:
Tyson Whitehead
2018-08-21 15:37:06 -04:00
parent ffc812c681
commit c2c217660b

View File

@@ -92,54 +92,73 @@ in let
# jobs - The jobs hydra is to run. # jobs - The jobs hydra is to run.
# #
jobs = { jobs =
# Tweak the nixos make-channel code to include the upstream channel. let
# # Extract the valid derivations from an overlay
# 1. Replace the git repo nixpkgs with a copy of the unpacked nixpkgs channel. #
# # nameSet - the attribute set the uncomposed overlay (just the names are required)
channel = # valueSet - the final attribute from the composed overlay (the values are required)
( import (nixpkgsGit + /nixos/lib/make-channel.nix) { #
inherit pkgs version versionSuffix; extractDerivations = valueSet: nameSet:
nixpkgs = ccpkgsGit; builtins.listToAttrs
} ).overrideAttrs ( original: { ( builtins.map
name = "ccpkgs-channel"; ( name: { inherit name; value = valueSet.${name}; } )
distPhase = ( pkgs.lib.filter
'' ( name: pkgs.lib.isDerivation valueSet.${name} )
rm -fr upstream ( pkgs.lib.attrNames nameSet ) ) );
cp -rd ${nixpkgs}/nixos-${version} upstream
'' + original.distPhase;
} );
# tested - Aggregate package set required to built for automatic channel release # Provided overlays
# pkgsNamesTopLevel = let self = import ./pkgs/all-packages.nix self { } self; in self;
tested = pkgs.lib.hydraJob (pkgs.releaseTools.aggregate { pkgsNamesPython = let self = import ./pkgs/python-packages.nix { } self { } ; in self;
name = "ccpkgs-${version}";
constituents = temporaryNamesTopLevel = let self = import ./temporary/all-temporary.nix self { } self; in self;
builtins.attrValues jobs.pkgs temporaryNamesPython = let self = import ./temporary/python-packages.nix { } self { } ; in self;
++ builtins.attrValues jobs.temporary;
meta = { in {
description = "Release-critical builds for the ccpkgs channel"; # Tweak the nixos make-channel code to include the upstream channel.
maintainers = with pkgs.lib.maintainers; [ ]; #
# 1. Replace the git repo nixpkgs with a copy of the unpacked nixpkgs channel.
#
channel =
( import (nixpkgsGit + /nixos/lib/make-channel.nix) {
inherit pkgs version versionSuffix;
nixpkgs = ccpkgsGit;
} ).overrideAttrs ( original: {
name = "ccpkgs-channel";
distPhase =
''
rm -fr upstream
cp -rd ${nixpkgs}/nixos-${version} upstream
'' + original.distPhase;
} );
# tested - Aggregate package set required to built for automatic channel release
#
tested = pkgs.lib.hydraJob (pkgs.releaseTools.aggregate {
name = "ccpkgs-${version}";
constituents = builtins.map ( pkgs.lib.collect pkgs.lib.isDerivation ) [ jobs.pkgs jobs.temporary ];
meta = {
description = "Release-critical builds for the ccpkgs channel";
maintainers = with pkgs.lib.maintainers; [ ];
};
});
# pkgs - Attribute set of overlayed pkgs.
#
pkgs = extractDerivations pkgs pkgsNamesTopLevel // {
python2Packages = extractDerivations pkgs.python2Packages pkgsNamesPython;
python3Packages = extractDerivations pkgs.python3Packages pkgsNamesPython;
}; };
});
# pkgs - Attribute set of overlayed pkgs.
#
pkgs =
builtins.listToAttrs
( builtins.map ( name: { inherit name; value = pkgs.${name}; } )
( builtins.filter ( name: builtins.isAttrs pkgs.${name} && pkgs.${name}.type or "" == "derivation" )
( builtins.attrNames ( let self = import ./pkgs/all-packages.nix self { } self; in self ) ) ) );
# temporary - Attribute set of overlayed pkgs. # temporary - Attribute set of overlayed pkgs.
# #
temporary = temporary = extractDerivations pkgs temporaryNamesTopLevel // {
builtins.listToAttrs python2Packages = extractDerivations pkgs.python2Packages temporaryNamesPython;
( map ( name: { inherit name; value = pkgs.${name}; } ) python3Packages = extractDerivations pkgs.python3Packages temporaryNamesPython;
( builtins.filter ( name: builtins.isAttrs pkgs.${name} && pkgs.${name}.type or "" == "derivation" ) };
( builtins.attrNames ( let self = import ./temporary/all-temporary.nix self { } self; in self ) ) ) ); };
};
in jobs in jobs