about summary refs log tree commit diff
path: root/pkgs/development/tools/misc/hydra
diff options
context:
space:
mode:
authorRick van Schijndel <rol3517@gmail.com>2022-05-10 21:47:01 +0200
committerRick van Schijndel <rol3517@gmail.com>2022-05-10 23:32:02 +0200
commit292c63a5d6d107d15b09099a93af8b98c9f90243 (patch)
tree6603653087cdeb5fee0bfe1296d4471904eba251 /pkgs/development/tools/misc/hydra
parent33b01d51040d917513d81b42c3d4048a8b0cd9d1 (diff)
hydra: remove multi-version support
This is a legacy of when a "stable" version of hydra existed, and this
probably won't be coming back.

This also removes some obsolete bits which have no effect on the
result of evaluation.

Unlike the original approach in #157072, we're moving the common
expression to "unstable.nix" instead. This allow putting everything in
one commit, satisfies git's rename detection, and remains bisectable.

Co-Authored-By: Bernardo Meurer <bernardo@meurer.org>
Co-Authored-By: Linus Heckemann <git@sphalerite.org>
Diffstat (limited to 'pkgs/development/tools/misc/hydra')
-rw-r--r--pkgs/development/tools/misc/hydra/default.nix26
-rw-r--r--pkgs/development/tools/misc/hydra/unstable.nix (renamed from pkgs/development/tools/misc/hydra/common.nix)34
2 files changed, 28 insertions, 32 deletions
diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix
deleted file mode 100644
index 5289015d43b24..0000000000000
--- a/pkgs/development/tools/misc/hydra/default.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ lib, fetchFromGitHub, callPackage, nixVersions, nixosTests, fetchpatch }:
-
-{
-  hydra-unstable = callPackage ./common.nix {
-    version = "2022-02-07";
-    src = fetchFromGitHub {
-      owner = "NixOS";
-      repo = "hydra";
-      rev = "517dce285a851efd732affc084c7083aed2e98cd";
-      sha256 = "sha256-abWhd/VLNse3Gz7gcVbFANJLAhHV4nbOKjhVDmq/Zmg=";
-    };
-    patches = [
-      ./eval.patch
-      ./missing-std-string.patch
-      (fetchpatch {
-        url = "https://github.com/NixOS/hydra/commit/5ae26aa7604f714dcc73edcb74fe71ddc8957f6c.patch";
-        sha256 = "sha256-wkbWo8SFbT3qwVxwkKQWpQT5Jgb1Bb51yiLTlFdDN/I=";
-      })
-    ];
-    nix = nixVersions.nix_2_6;
-
-    tests = {
-      basic = nixosTests.hydra.hydra-unstable;
-    };
-  };
-}
diff --git a/pkgs/development/tools/misc/hydra/common.nix b/pkgs/development/tools/misc/hydra/unstable.nix
index 2314f5f9f64fb..7d3521702a792 100644
--- a/pkgs/development/tools/misc/hydra/common.nix
+++ b/pkgs/development/tools/misc/hydra/unstable.nix
@@ -1,16 +1,20 @@
-{ stdenv, nix, perlPackages, buildEnv
+{ stdenv
+, lib
+, nix, perlPackages, buildEnv
 , makeWrapper, autoconf, automake, libtool, unzip, pkg-config, sqlite, libpqxx_6
 , top-git, mercurial, darcs, subversion, breezy, openssl, bzip2, libxslt
 , perl, postgresql, nukeReferences, git, boehmgc, nlohmann_json
 , docbook_xsl, openssh, gnused, coreutils, findutils, gzip, xz, gnutar
-, rpm, dpkg, cdrkit, pixz, lib, boost, autoreconfHook, src ? null, version ? null
-, migration ? false, patches ? []
-, tests ? {}, mdbook
+, rpm, dpkg, cdrkit, pixz, boost, autoreconfHook
+, mdbook
 , foreman
 , python3
 , libressl
 , cacert
 , glibcLocales
+, fetchFromGitHub
+, fetchpatch
+, nixosTests
 }:
 
 let
@@ -88,8 +92,14 @@ let
   };
 in stdenv.mkDerivation rec {
   pname = "hydra";
+  version = "2022-02-07";
 
-  inherit stdenv src version patches;
+  src = fetchFromGitHub {
+    owner = "NixOS";
+    repo = "hydra";
+    rev = "517dce285a851efd732affc084c7083aed2e98cd";
+    sha256 = "sha256-abWhd/VLNse3Gz7gcVbFANJLAhHV4nbOKjhVDmq/Zmg=";
+  };
 
   buildInputs =
     [ makeWrapper libtool unzip nukeReferences sqlite libpqxx_6
@@ -116,6 +126,15 @@ in stdenv.mkDerivation rec {
     libressl.nc
   ];
 
+  patches = [
+    ./eval.patch
+    ./missing-std-string.patch
+    (fetchpatch {
+      url = "https://github.com/NixOS/hydra/commit/5ae26aa7604f714dcc73edcb74fe71ddc8957f6c.patch";
+      sha256 = "sha256-wkbWo8SFbT3qwVxwkKQWpQT5Jgb1Bb51yiLTlFdDN/I=";
+    })
+  ];
+
   configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];
 
   NIX_CFLAGS_COMPILE = "-pthread";
@@ -152,7 +171,10 @@ in stdenv.mkDerivation rec {
 
   doCheck = true;
 
-  passthru = { inherit perlDeps migration tests; };
+  passthru = {
+    inherit perlDeps;
+    tests.basic = nixosTests.hydra.hydra-unstable;
+  };
 
   meta = with lib; {
     description = "Nix-based continuous build system";