Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e7c38c14b1bc
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d88f83de6b90
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Sep 26, 2016

  1. Copy the full SHA
    37f0aaf View commit details

Commits on Jul 2, 2017

  1. Merge pull request #17681 from ericsagnes/feat/releaseTools.channel

    releaseTools: add channel function
    joachifm authored Jul 2, 2017
    Copy the full SHA
    d88f83d View commit details
Showing with 52 additions and 0 deletions.
  1. +52 −0 pkgs/build-support/release/default.nix
52 changes: 52 additions & 0 deletions pkgs/build-support/release/default.nix
Original file line number Diff line number Diff line change
@@ -73,4 +73,56 @@ rec {
done
'';

/* 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 suscribed.
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 = ./.;
};
*/
channel =
{ name, src, constituents ? [], meta ? {}, isNixOS ? true, ... }@args:
stdenv.mkDerivation ({
preferLocalBuild = true;
_hydraAggregate = true;

phases = [ "unpackPhase" "patchPhase" "installPhase" ];

patchPhase = stdenv.lib.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" ]);

}