Skip to content

Commit

Permalink
hydra: 2020-03-24 -> 2020-04-07
Browse files Browse the repository at this point in the history
Also removed `pkgs.hydra-flakes` since flake-support has been merged
into master[1]. Because of that, `pkgs.hydra-unstable` is now compiled
against `pkgs.nixFlakes` and currently requires a patch since Hydra's
master doesn't compile[2] atm.

[1] NixOS/hydra#730
[2] NixOS/hydra#732

(cherry picked from commit 0f5c38f)
  • Loading branch information
Ma27 committed Apr 9, 2020
1 parent 377b024 commit c25e25f
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 27 deletions.
8 changes: 4 additions & 4 deletions nixos/doc/manual/release-notes/rl-2003.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1009,10 +1009,10 @@ auth required pam_succeed_if.so uid >= 1000 quiet
</listitem>
<listitem>
<para>
Deploy a newer version of Hydra to activate the DB optimizations. You can choose from
either <package>hydra-unstable</package> (latest <literal>master</literal> compiled
against <package>nixUnstable</package>) and <package>hydra-flakes</package> (latest
version with flake-support).
Deploy a newer version of Hydra to activate the DB optimizations. This can be done by
using <package>hydra-unstable</package>. This package already includes
<link xlink:href="https://github.com/nixos/rfcs/pull/49">flake-support</link> and is
therefore compiled against <package>pkgs.nixFlakes</package>.
<warning>
<para>
If your <link linkend="opt-system.stateVersion">stateVersion</link> is set to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ in
warnings = optional (cfg.package.migration or false) ''
You're currently deploying an older version of Hydra which is needed to
make some required database changes[1]. As soon as this is done, it's recommended
to run `hydra-backfill-ids` and set `services.hydra.package` to either `pkgs.hydra-unstable`
or `pkgs.hydra-flakes` after that.
to run `hydra-backfill-ids` and set `services.hydra.package` to `pkgs.hydra-unstable`
after that.
[1] https://github.com/NixOS/hydra/pull/711
'';
Expand All @@ -212,7 +212,7 @@ in
due to an overlay. To upgrade Hydra, you need to take two steps as some
bigger changes in the database schema were implemented recently[1]. You first
need to deploy `pkgs.hydra-migration`, run `hydra-backfill-ids` on the server
and then deploy either `pkgs.hydra-unstable` or `pkgs.hydra-flakes`.
and then deploy `pkgs.hydra-unstable`.
If you want to use `pkgs.hydra` from your overlay, please set `services.hydra.package`
explicitly to `pkgs.hydra` and make sure you know what you're doing.
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/hydra/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ let
inherit (import ./common.nix { inherit system; }) baseConfig;

hydraPkgs = {
inherit (pkgs) hydra-migration hydra-unstable hydra-flakes;
inherit (pkgs) hydra-migration hydra-unstable;
};

makeHydraTest = with pkgs.lib; name: package: makeTest {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/tools/misc/hydra/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, guile, perl, postgresql, nukeReferences, git, boehmgc, nlohmann_json
, docbook_xsl, openssh, gnused, coreutils, findutils, gzip, lzma, gnutar
, rpm, dpkg, cdrkit, pixz, lib, boost, autoreconfHook, src ? null, version ? null
, migration ? false
, migration ? false, patches ? []
}:

with stdenv;
Expand Down Expand Up @@ -73,7 +73,7 @@ let
in stdenv.mkDerivation rec {
pname = "hydra";

inherit stdenv src version;
inherit stdenv src version patches;

buildInputs =
[ makeWrapper autoconf automake libtool unzip nukeReferences sqlite libpqxx
Expand Down
28 changes: 12 additions & 16 deletions pkgs/development/tools/misc/hydra/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ fetchFromGitHub, nixStable, nixUnstable, callPackage, nixFlakes }:
{ fetchFromGitHub, nixStable, callPackage, nixFlakes, fetchpatch }:

{
# Package for phase-1 of the db migration for Hydra.
Expand All @@ -15,28 +15,24 @@
migration = true;
};

# Hydra from latest master (or flakes) branch. Contains breaking changes,
# Hydra from latest master branch. Contains breaking changes,
# so when having an older version, `pkgs.hydra-migration` should be deployed first.

hydra-unstable = callPackage ./common.nix {
version = "2020-03-24";
version = "2020-04-07";
src = fetchFromGitHub {
owner = "NixOS";
repo = "hydra";
rev = "12cc46cdb36321acd4c982429a86eb0f8f3cc969";
sha256 = "10ipxzdxr47c8w5jg69mbax2ykc7lb5fs9bbdd3iai9wzyfz17ln";
};
nix = nixUnstable;
};

hydra-flakes = callPackage ./common.nix {
version = "2020-03-27";
src = fetchFromGitHub {
owner = "NixOS";
repo = "hydra";
rev = "a7540b141d085a7e78c21fda8e8c05907c659b34";
sha256 = "08fs7593w5zs8vh4c66gvrxk6s840pp6hj8nwf51wsa27kg5a943";
rev = "4cabb37ebdeade1435ad8ebf1913cdd603b9c452";
sha256 = "1ccy639x6yyrqqqqli7vlqm6pcvcq5dx1w3ckba77rl8pd5h31f7";
};
patches = [
# https://github.com/NixOS/hydra/pull/732
(fetchpatch {
url = "https://github.com/NixOS/hydra/commit/2f9d422172235297759f2b224fe0636cad07b6fb.patch";
sha256 = "0152nsqqc5d85qdygmwrsk88i9y6nk1b639fj2n042pjvr0kpz6k";
})
];
nix = nixFlakes;
};
}
7 changes: 6 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11972,7 +11972,12 @@ in
hwloc = callPackage ../development/libraries/hwloc {};

inherit (callPackage ../development/tools/misc/hydra { })
hydra-migration hydra-unstable hydra-flakes;
hydra-migration hydra-unstable;

hydra-flakes = throw ''
Flakes support has been merged into Hydra's master. Please use
`pkgs.hydra-unstable` now.
'';

hydra-cli = callPackage ../development/tools/misc/hydra-cli { };

Expand Down

0 comments on commit c25e25f

Please sign in to comment.