From 0f5c38feed3044845d3ab7378a6d81a1f34b93da Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 6 Apr 2020 01:13:07 +0200 Subject: [PATCH] hydra: 2020-03-24 -> 2020-04-07 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] https://github.com/NixOS/hydra/pull/730 [2] https://github.com/NixOS/hydra/pull/732 --- nixos/doc/manual/release-notes/rl-2003.xml | 8 +++--- .../continuous-integration/hydra/default.nix | 6 ++-- nixos/tests/hydra/default.nix | 2 +- pkgs/development/tools/misc/hydra/common.nix | 4 +-- pkgs/development/tools/misc/hydra/default.nix | 28 ++++++++----------- pkgs/top-level/all-packages.nix | 7 ++++- 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index 64a56d9197f..fb4ab1d26e8 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -748,10 +748,10 @@ auth required pam_succeed_if.so uid >= 1000 quiet - Deploy a newer version of Hydra to activate the DB optimizations. You can choose from - either hydra-unstable (latest master compiled - against nixUnstable) and hydra-flakes (latest - version with flake-support). + Deploy a newer version of Hydra to activate the DB optimizations. This can be done by + using hydra-unstable. This package already includes + flake-support and is + therefore compiled against pkgs.nixFlakes. If your stateVersion is set to diff --git a/nixos/modules/services/continuous-integration/hydra/default.nix b/nixos/modules/services/continuous-integration/hydra/default.nix index 0c335f14f78..52e4a3aed33 100644 --- a/nixos/modules/services/continuous-integration/hydra/default.nix +++ b/nixos/modules/services/continuous-integration/hydra/default.nix @@ -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 ''; @@ -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. diff --git a/nixos/tests/hydra/default.nix b/nixos/tests/hydra/default.nix index 5d94eb91bf5..2336e4033d6 100644 --- a/nixos/tests/hydra/default.nix +++ b/nixos/tests/hydra/default.nix @@ -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 { diff --git a/pkgs/development/tools/misc/hydra/common.nix b/pkgs/development/tools/misc/hydra/common.nix index 5aee5df847f..52a91db6758 100644 --- a/pkgs/development/tools/misc/hydra/common.nix +++ b/pkgs/development/tools/misc/hydra/common.nix @@ -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; @@ -74,7 +74,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 diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix index 35c069211b3..9e14e16dbaa 100644 --- a/pkgs/development/tools/misc/hydra/default.nix +++ b/pkgs/development/tools/misc/hydra/default.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, nixStable, nixUnstable, callPackage, nixFlakes }: +{ fetchFromGitHub, nixStable, callPackage, nixFlakes, fetchpatch }: { # Package for phase-1 of the db migration for Hydra. @@ -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; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 39db9e9e04f..fdf72f3e94e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12100,7 +12100,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 { };