channel
pkgs.releaseTools.channel
Docs pulled from | This Revision | 10 minutes ago
Create a channel job which success depends on the success of all of its contituents. Channel jobs are a special type of jobs that are listed in the channel tab of Hydra and that can be subscribed. A tarball of the src attribute is distributed via the channel.
-
constituents: a list of derivations on which the channel success depends.
-
name: the channel name that will be used in the hydra interface.
-
src: should point to the root folder of the nix-expressions used by the channel, typically a folder containing a
default.nix
.channel { constituents = [ foo bar baz ]; name = "my-channel"; src = ./.; };
Noogle detected
Implementation
The following is the current implementation of this function.
channel =
{
name,
src,
constituents ? [ ],
meta ? { },
isNixOS ? true,
...
}@args:
stdenv.mkDerivation (
{
preferLocalBuild = true;
_hydraAggregate = true;
dontConfigure = true;
dontBuild = true;
patchPhase = optionalString isNixOS ''
touch .update-on-nixos-rebuild
'';
installPhase = ''
mkdir -p $out/{tarballs,nix-support}
tar cJf "$out/tarballs/nixexprs.tar.xz" \
--owner=0 --group=0 --mtime="1970-01-01 00:00:00 UTC" \
--transform='s!^\.!${name}!' .
echo "channel - $out/tarballs/nixexprs.tar.xz" > "$out/nix-support/hydra-build-products"
echo $constituents > "$out/nix-support/hydra-aggregate-constituents"
# Propagate build failures.
for i in $constituents; do
if [ -e "$i/nix-support/failed" ]; then
touch "$out/nix-support/failed"
fi
done
'';
meta = meta // {
isHydraChannel = true;
};
}
// removeAttrs args [ "meta" ]
);