From 956bda49408f9132b6d5b9df74d2f8019667c583 Mon Sep 17 00:00:00 2001 From: Rick van Schijndel Date: Wed, 27 Oct 2021 21:41:02 +0200 Subject: [PATCH 1/7] hydra-unstable: 2021-08-11 -> 2021-12-17 Adds some new required deps too. Apply nixpkgs-fmt. Enable doCheck (tests). (cherry picked from commit 5898812d2ff0bf793373266c277b0717470d7e0b) --- pkgs/development/tools/misc/hydra/common.nix | 252 ++++++++++++------ pkgs/development/tools/misc/hydra/default.nix | 6 +- pkgs/top-level/perl-packages.nix | 15 ++ 3 files changed, 189 insertions(+), 84 deletions(-) diff --git a/pkgs/development/tools/misc/hydra/common.nix b/pkgs/development/tools/misc/hydra/common.nix index 1ae54d629acc837..2c8a525fcad71cb 100644 --- a/pkgs/development/tools/misc/hydra/common.nix +++ b/pkgs/development/tools/misc/hydra/common.nix @@ -1,24 +1,65 @@ -{ stdenv, 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 +{ stdenv +, 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 +, foreman +, python3 +, libressl }: with stdenv; if lib.versions.major nix.version == "1" - then throw "This Hydra version doesn't support Nix 1.x" +then throw "This Hydra version doesn't support Nix 1.x" else -let - perlDeps = buildEnv { - name = "hydra-perl-deps"; - paths = with perlPackages; lib.closePropagation - [ ModulePluggable + let + perlDeps = buildEnv { + name = "hydra-perl-deps"; + paths = with perlPackages; lib.closePropagation [ CatalystActionREST CatalystAuthenticationStoreDBIxClass CatalystDevel @@ -36,107 +77,156 @@ let CatalystViewDownload CatalystViewJSON CatalystViewTT - CatalystXScriptServerStarman CatalystXRoleApplicator + CatalystXScriptServerStarman CryptPassphrase CryptPassphraseArgon2 CryptRandPasswd - DBDPg - DBDSQLite DataDump DateTime + DBDPg + DBDSQLite DigestSHA1 EmailMIME EmailSender - FileSlurp + FileSlurper IOCompress IPCRun JSON - JSONAny + JSONMaybeXS JSONXS + ListSomeUtils LWP LWPProtocolHttps + ModulePluggable NetAmazonS3 NetPrometheus NetStatsd PadWalker + ParallelForkManager + PerlCriticCommunity PrometheusTinyShared - Readonly - SQLSplitStatement + ReadonlyX SetScalar + SQLSplitStatement Starman StringCompareConstantTime SysHostnameLong TermSizeAny + Test2Harness + TestPostgreSQL TextDiff TextTable XMLSimple YAML + boehmgc + git nix nix.perl-bindings - git - boehmgc ]; - }; -in stdenv.mkDerivation rec { - pname = "hydra"; - - inherit stdenv src version patches; - - buildInputs = - [ makeWrapper autoconf automake libtool unzip nukeReferences sqlite libpqxx_6 - top-git mercurial /*darcs*/ subversion breezy openssl bzip2 libxslt - perlDeps perl nix + }; + in + stdenv.mkDerivation rec { + pname = "hydra"; + + inherit stdenv src version patches; + + buildInputs = [ + makeWrapper + autoconf + automake + libtool + unzip + nukeReferences + sqlite + libpqxx_6 + top-git + mercurial + darcs + subversion + breezy + openssl + bzip2 + libxslt + perlDeps + perl + nix postgresql # for running the tests nlohmann_json boost + pixz + ]; + + hydraPath = lib.makeBinPath ([ + sqlite + subversion + openssh + nix + coreutils + findutils + pixz + gzip + bzip2 + xz + gnutar + unzip + git + top-git + mercurial /*darcs*/ + gnused + breezy + ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ]); + + nativeBuildInputs = [ autoreconfHook pkg-config mdbook ]; + + configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; + + checkInputs = [ + foreman + python3 + libressl.nc ]; - hydraPath = lib.makeBinPath ( - [ sqlite subversion openssh nix coreutils findutils pixz - gzip bzip2 xz gnutar unzip git top-git mercurial /*darcs*/ gnused breezy - ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ] ); - - nativeBuildInputs = [ autoreconfHook pkg-config mdbook ]; - - configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; - - NIX_CFLAGS_COMPILE = "-pthread"; - - shellHook = '' - PATH=$(pwd)/src/script:$(pwd)/src/hydra-eval-jobs:$(pwd)/src/hydra-queue-runner:$(pwd)/src/hydra-evaluator:$PATH - PERL5LIB=$(pwd)/src/lib:$PERL5LIB; - ''; - - enableParallelBuilding = true; - - preCheck = '' - patchShebangs . - export LOGNAME=''${LOGNAME:-foo} - ''; - - postInstall = '' - mkdir -p $out/nix-support - for i in $out/bin/*; do - read -n 4 chars < $i - if [[ $chars =~ ELF ]]; then continue; fi - wrapProgram $i \ - --prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \ - --prefix PATH ':' $out/bin:$hydraPath \ - --set HYDRA_RELEASE ${version} \ - --set HYDRA_HOME $out/libexec/hydra \ - --set NIX_RELEASE ${nix.name or "unknown"} - done - ''; # */ - - dontStrip = true; - - passthru = { inherit perlDeps migration tests; }; - - meta = with lib; { - description = "Nix-based continuous build system"; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ ]; - }; -} + NIX_CFLAGS_COMPILE = "-pthread"; + + shellHook = '' + PATH=$(pwd)/src/script:$(pwd)/src/hydra-eval-jobs:$(pwd)/src/hydra-queue-runner:$(pwd)/src/hydra-evaluator:$PATH + PERL5LIB=$(pwd)/src/lib:$PERL5LIB; + ''; + + enableParallelBuilding = true; + + preCheck = '' + patchShebangs . + export LOGNAME=''${LOGNAME:-foo} + # set $HOME for bzr so it can create its trace file + export HOME=$(mktemp -d) + ''; + + postInstall = '' + mkdir -p $out/nix-support + for i in $out/bin/*; do + read -n 4 chars < $i + if [[ $chars =~ ELF ]]; then continue; fi + wrapProgram $i \ + --prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \ + --prefix PATH ':' $out/bin:$hydraPath \ + --set HYDRA_RELEASE ${version} \ + --set HYDRA_HOME $out/libexec/hydra \ + --set NIX_RELEASE ${nix.name or "unknown"} + done + ''; # */ + + dontStrip = true; + + doCheck = true; + + passthru = { inherit perlDeps migration tests; }; + + meta = with lib; { + description = "Nix-based continuous build system"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ lheckemann mindavi das_j ]; + }; + } diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix index 1688e92c8441b11..eb55cc5f642eb15 100644 --- a/pkgs/development/tools/misc/hydra/default.nix +++ b/pkgs/development/tools/misc/hydra/default.nix @@ -2,12 +2,12 @@ { hydra-unstable = callPackage ./common.nix { - version = "2021-08-11"; + version = "2021-12-17"; src = fetchFromGitHub { owner = "NixOS"; repo = "hydra"; - rev = "9bce425c3304173548d8e822029644bb51d35263"; - sha256 = "sha256-tGzwKNW/odtAYcazWA9bPVSmVXMGKfXsqCA1UYaaxmU="; + rev = "e1e5fafdff63c1e1595d2edb8c9854710211a0d7"; + sha256 = "sha256-JPkw3heasqX9iWju7BWjKDsyoS+HmLIKM2ibwHq5+Ko="; }; nix = nixVersions.unstable; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 85a7f7b19886c83..6cc6f6d03172ea9 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -18982,6 +18982,21 @@ let }; }; + ReadonlyX = buildPerlModule { + pname = "ReadonlyX"; + version = "1.04"; + src = fetchurl { + url = "mirror://cpan/authors/id/S/SA/SANKO/ReadonlyX-1.04.tar.gz"; + sha256 = "81bb97dba93ac6b5ccbce04a42c3590eb04557d75018773ee18d5a30fcf48188"; + }; + buildInputs = [ ModuleBuildTiny TestFatal ]; + meta = { + homepage = "https://github.com/sanko/readonly"; + description = "Faster facility for creating read-only scalars, arrays, hashes"; + license = lib.licenses.artistic2; + }; + }; + ReadonlyXS = buildPerlPackage { pname = "Readonly-XS"; version = "1.05"; From 627e8f57970e0a1e7044e3fbb9cb65eafdf0dbc4 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Tue, 15 Feb 2022 18:02:49 +0100 Subject: [PATCH 2/7] perlPackages.UUID4Tiny: init at 0.002 --- pkgs/top-level/perl-packages.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 6cc6f6d03172ea9..fc33bcd91d790c5 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -24384,6 +24384,19 @@ let }; }; + UUID4Tiny = buildPerlPackage { + pname = "UUID4-Tiny"; + version = "0.002"; + src = fetchurl { + url = "mirror://cpan/authors/id/C/CV/CVLIBRARY/UUID4-Tiny-0.002.tar.gz"; + sha256 = "e7535b31e386d432dec7adde214348389e1d5cf753e7ed07f1ae04c4360840cf"; + }; + meta = { + description = "Cryptographically secure v4 UUIDs for Linux x64"; + license = with lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + UUIDTiny = buildPerlPackage { pname = "UUID-Tiny"; version = "1.04"; From a65a2fd17e369f99deb7344cfef0beead8dddbb4 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Mon, 14 Feb 2022 16:25:07 +0100 Subject: [PATCH 3/7] hydra-unstable: 2021-12-17 -> 2022-02-07 --- pkgs/development/tools/misc/hydra/common.nix | 21 ++++++++++++------- pkgs/development/tools/misc/hydra/default.nix | 15 +++++++++---- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/pkgs/development/tools/misc/hydra/common.nix b/pkgs/development/tools/misc/hydra/common.nix index 2c8a525fcad71cb..9f720bfb53b451e 100644 --- a/pkgs/development/tools/misc/hydra/common.nix +++ b/pkgs/development/tools/misc/hydra/common.nix @@ -5,6 +5,8 @@ , makeWrapper , autoconf , automake +, cacert +, glibcLocales , libtool , unzip , pkg-config @@ -60,19 +62,19 @@ else perlDeps = buildEnv { name = "hydra-perl-deps"; paths = with perlPackages; lib.closePropagation [ + AuthenSASL CatalystActionREST CatalystAuthenticationStoreDBIxClass + CatalystAuthenticationStoreLDAP CatalystDevel - CatalystDispatchTypeRegex CatalystPluginAccessLog CatalystPluginAuthorizationRoles CatalystPluginCaptcha CatalystPluginPrometheusTiny CatalystPluginSessionStateCookie CatalystPluginSessionStoreFastMmap - CatalystPluginSmartURI CatalystPluginStackTrace - CatalystRuntime + CatalystPluginUnicodeEncoding CatalystTraitForRequestProxyBase CatalystViewDownload CatalystViewJSON @@ -90,8 +92,11 @@ else EmailMIME EmailSender FileSlurper + FileWhich + git IOCompress IPCRun + IPCRun3 JSON JSONMaybeXS JSONXS @@ -113,15 +118,15 @@ else StringCompareConstantTime SysHostnameLong TermSizeAny + TermReadKey Test2Harness + TestMore TestPostgreSQL TextDiff TextTable - XMLSimple + UUID4Tiny YAML - boehmgc - git - nix + XMLSimple nix.perl-bindings ]; }; @@ -182,7 +187,9 @@ else configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; checkInputs = [ + cacert foreman + glibcLocales python3 libressl.nc ]; diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix index eb55cc5f642eb15..0abaab552436582 100644 --- a/pkgs/development/tools/misc/hydra/default.nix +++ b/pkgs/development/tools/misc/hydra/default.nix @@ -1,18 +1,25 @@ -{ fetchFromGitHub, callPackage, nixVersions, nixosTests }: +{ lib, fetchFromGitHub, nixVersions, callPackage, nixosTests, fetchpatch }: { hydra-unstable = callPackage ./common.nix { - version = "2021-12-17"; + version = "2022-02-07"; src = fetchFromGitHub { owner = "NixOS"; repo = "hydra"; - rev = "e1e5fafdff63c1e1595d2edb8c9854710211a0d7"; - sha256 = "sha256-JPkw3heasqX9iWju7BWjKDsyoS+HmLIKM2ibwHq5+Ko="; + rev = "517dce285a851efd732affc084c7083aed2e98cd"; + sha256 = "sha256-abWhd/VLNse3Gz7gcVbFANJLAhHV4nbOKjhVDmq/Zmg="; }; nix = nixVersions.unstable; tests = { basic = nixosTests.hydra.hydra-unstable; }; + + patches = [ + (fetchpatch { + url = "https://github.com/NixOS/hydra/commit/5ae26aa7604f714dcc73edcb74fe71ddc8957f6c.patch"; + sha256 = "sha256-wkbWo8SFbT3qwVxwkKQWpQT5Jgb1Bb51yiLTlFdDN/I="; + }) + ]; }; } From c0098027761b8053ddd4c00fc5b32c38b3c10457 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Tue, 15 Feb 2022 19:22:41 +0100 Subject: [PATCH 4/7] hydra: don't force HYDRA_RELEASE --- pkgs/development/tools/misc/hydra/common.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/hydra/common.nix b/pkgs/development/tools/misc/hydra/common.nix index 9f720bfb53b451e..72f700ada783343 100644 --- a/pkgs/development/tools/misc/hydra/common.nix +++ b/pkgs/development/tools/misc/hydra/common.nix @@ -218,7 +218,7 @@ else wrapProgram $i \ --prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \ --prefix PATH ':' $out/bin:$hydraPath \ - --set HYDRA_RELEASE ${version} \ + --set-default HYDRA_RELEASE ${version} \ --set HYDRA_HOME $out/libexec/hydra \ --set NIX_RELEASE ${nix.name or "unknown"} done From e979e0469509d40db040e503fd12ca712bfea2c7 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Tue, 15 Feb 2022 19:29:25 +0100 Subject: [PATCH 5/7] 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 --- pkgs/development/tools/misc/hydra/default.nix | 25 ------------- .../misc/hydra/{common.nix => unstable.nix} | 37 ++++++++++++------- pkgs/top-level/all-packages.nix | 3 +- 3 files changed, 24 insertions(+), 41 deletions(-) delete mode 100644 pkgs/development/tools/misc/hydra/default.nix rename pkgs/development/tools/misc/hydra/{common.nix => unstable.nix} (87%) diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix deleted file mode 100644 index 0abaab552436582..000000000000000 --- a/pkgs/development/tools/misc/hydra/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, fetchFromGitHub, nixVersions, callPackage, nixosTests, fetchpatch }: - -{ - hydra-unstable = callPackage ./common.nix { - version = "2022-02-07"; - src = fetchFromGitHub { - owner = "NixOS"; - repo = "hydra"; - rev = "517dce285a851efd732affc084c7083aed2e98cd"; - sha256 = "sha256-abWhd/VLNse3Gz7gcVbFANJLAhHV4nbOKjhVDmq/Zmg="; - }; - nix = nixVersions.unstable; - - tests = { - basic = nixosTests.hydra.hydra-unstable; - }; - - patches = [ - (fetchpatch { - url = "https://github.com/NixOS/hydra/commit/5ae26aa7604f714dcc73edcb74fe71ddc8957f6c.patch"; - sha256 = "sha256-wkbWo8SFbT3qwVxwkKQWpQT5Jgb1Bb51yiLTlFdDN/I="; - }) - ]; - }; -} diff --git a/pkgs/development/tools/misc/hydra/common.nix b/pkgs/development/tools/misc/hydra/unstable.nix similarity index 87% rename from pkgs/development/tools/misc/hydra/common.nix rename to pkgs/development/tools/misc/hydra/unstable.nix index 72f700ada783343..3c1ac457d584550 100644 --- a/pkgs/development/tools/misc/hydra/common.nix +++ b/pkgs/development/tools/misc/hydra/unstable.nix @@ -1,8 +1,12 @@ { stdenv +, lib , nix , perlPackages , buildEnv +, fetchFromGitHub +, fetchpatch , makeWrapper +, nixosTests , autoconf , automake , cacert @@ -38,26 +42,14 @@ , dpkg , cdrkit , pixz -, lib , boost , autoreconfHook -, src ? null -, version ? null -, migration ? false -, patches ? [ ] -, tests ? { } , mdbook , foreman , python3 , libressl }: -with stdenv; - -if lib.versions.major nix.version == "1" -then throw "This Hydra version doesn't support Nix 1.x" -else - let perlDeps = buildEnv { name = "hydra-perl-deps"; @@ -134,7 +126,14 @@ else stdenv.mkDerivation rec { pname = "hydra"; - inherit stdenv src version patches; + version = "2022-02-07"; + + src = fetchFromGitHub { + owner = "NixOS"; + repo = "hydra"; + rev = "517dce285a851efd732affc084c7083aed2e98cd"; + sha256 = "sha256-abWhd/VLNse3Gz7gcVbFANJLAhHV4nbOKjhVDmq/Zmg="; + }; buildInputs = [ makeWrapper @@ -228,7 +227,17 @@ else doCheck = true; - passthru = { inherit perlDeps migration tests; }; + passthru = { + inherit perlDeps; + tests.basic = nixosTests.hydra.hydra-unstable; + }; + + patches = [ + (fetchpatch { + url = "https://github.com/NixOS/hydra/commit/5ae26aa7604f714dcc73edcb74fe71ddc8957f6c.patch"; + sha256 = "sha256-wkbWo8SFbT3qwVxwkKQWpQT5Jgb1Bb51yiLTlFdDN/I="; + }) + ]; meta = with lib; { description = "Nix-based continuous build system"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a1648d87b0aa12e..7d906bb2c7209db 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17241,8 +17241,7 @@ with pkgs; hwloc = callPackage ../development/libraries/hwloc {}; - inherit (callPackage ../development/tools/misc/hydra { }) - hydra-unstable; + hydra-unstable = callPackage ../development/tools/misc/hydra/unstable.nix { nix = nix_2_4; }; hydra-cli = callPackage ../development/tools/misc/hydra-cli { }; From 8e0f8074b85c082e10a41ad38e63168ddb91f09b Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Tue, 15 Feb 2022 20:14:46 +0100 Subject: [PATCH 6/7] hydra: remove unnecessary indentation --- .../development/tools/misc/hydra/unstable.nix | 388 +++++++++--------- 1 file changed, 194 insertions(+), 194 deletions(-) diff --git a/pkgs/development/tools/misc/hydra/unstable.nix b/pkgs/development/tools/misc/hydra/unstable.nix index 3c1ac457d584550..e3934a5e74a63e1 100644 --- a/pkgs/development/tools/misc/hydra/unstable.nix +++ b/pkgs/development/tools/misc/hydra/unstable.nix @@ -50,199 +50,199 @@ , libressl }: - let - perlDeps = buildEnv { - name = "hydra-perl-deps"; - paths = with perlPackages; lib.closePropagation [ - AuthenSASL - CatalystActionREST - CatalystAuthenticationStoreDBIxClass - CatalystAuthenticationStoreLDAP - CatalystDevel - CatalystPluginAccessLog - CatalystPluginAuthorizationRoles - CatalystPluginCaptcha - CatalystPluginPrometheusTiny - CatalystPluginSessionStateCookie - CatalystPluginSessionStoreFastMmap - CatalystPluginStackTrace - CatalystPluginUnicodeEncoding - CatalystTraitForRequestProxyBase - CatalystViewDownload - CatalystViewJSON - CatalystViewTT - CatalystXRoleApplicator - CatalystXScriptServerStarman - CryptPassphrase - CryptPassphraseArgon2 - CryptRandPasswd - DataDump - DateTime - DBDPg - DBDSQLite - DigestSHA1 - EmailMIME - EmailSender - FileSlurper - FileWhich - git - IOCompress - IPCRun - IPCRun3 - JSON - JSONMaybeXS - JSONXS - ListSomeUtils - LWP - LWPProtocolHttps - ModulePluggable - NetAmazonS3 - NetPrometheus - NetStatsd - PadWalker - ParallelForkManager - PerlCriticCommunity - PrometheusTinyShared - ReadonlyX - SetScalar - SQLSplitStatement - Starman - StringCompareConstantTime - SysHostnameLong - TermSizeAny - TermReadKey - Test2Harness - TestMore - TestPostgreSQL - TextDiff - TextTable - UUID4Tiny - YAML - XMLSimple - nix.perl-bindings - ]; - }; - in - stdenv.mkDerivation rec { - pname = "hydra"; - - version = "2022-02-07"; - - src = fetchFromGitHub { - owner = "NixOS"; - repo = "hydra"; - rev = "517dce285a851efd732affc084c7083aed2e98cd"; - sha256 = "sha256-abWhd/VLNse3Gz7gcVbFANJLAhHV4nbOKjhVDmq/Zmg="; - }; - - buildInputs = [ - makeWrapper - autoconf - automake - libtool - unzip - nukeReferences - sqlite - libpqxx_6 - top-git - mercurial - darcs - subversion - breezy - openssl - bzip2 - libxslt - perlDeps - perl - nix - postgresql # for running the tests - nlohmann_json - boost - pixz - ]; - - hydraPath = lib.makeBinPath ([ - sqlite - subversion - openssh - nix - coreutils - findutils - pixz - gzip - bzip2 - xz - gnutar - unzip +let + perlDeps = buildEnv { + name = "hydra-perl-deps"; + paths = with perlPackages; lib.closePropagation [ + AuthenSASL + CatalystActionREST + CatalystAuthenticationStoreDBIxClass + CatalystAuthenticationStoreLDAP + CatalystDevel + CatalystPluginAccessLog + CatalystPluginAuthorizationRoles + CatalystPluginCaptcha + CatalystPluginPrometheusTiny + CatalystPluginSessionStateCookie + CatalystPluginSessionStoreFastMmap + CatalystPluginStackTrace + CatalystPluginUnicodeEncoding + CatalystTraitForRequestProxyBase + CatalystViewDownload + CatalystViewJSON + CatalystViewTT + CatalystXRoleApplicator + CatalystXScriptServerStarman + CryptPassphrase + CryptPassphraseArgon2 + CryptRandPasswd + DataDump + DateTime + DBDPg + DBDSQLite + DigestSHA1 + EmailMIME + EmailSender + FileSlurper + FileWhich git - top-git - mercurial /*darcs*/ - gnused - breezy - ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ]); - - nativeBuildInputs = [ autoreconfHook pkg-config mdbook ]; - - configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; - - checkInputs = [ - cacert - foreman - glibcLocales - python3 - libressl.nc + IOCompress + IPCRun + IPCRun3 + JSON + JSONMaybeXS + JSONXS + ListSomeUtils + LWP + LWPProtocolHttps + ModulePluggable + NetAmazonS3 + NetPrometheus + NetStatsd + PadWalker + ParallelForkManager + PerlCriticCommunity + PrometheusTinyShared + ReadonlyX + SetScalar + SQLSplitStatement + Starman + StringCompareConstantTime + SysHostnameLong + TermSizeAny + TermReadKey + Test2Harness + TestMore + TestPostgreSQL + TextDiff + TextTable + UUID4Tiny + YAML + XMLSimple + nix.perl-bindings ]; - - NIX_CFLAGS_COMPILE = "-pthread"; - - shellHook = '' - PATH=$(pwd)/src/script:$(pwd)/src/hydra-eval-jobs:$(pwd)/src/hydra-queue-runner:$(pwd)/src/hydra-evaluator:$PATH - PERL5LIB=$(pwd)/src/lib:$PERL5LIB; - ''; - - enableParallelBuilding = true; - - preCheck = '' - patchShebangs . - export LOGNAME=''${LOGNAME:-foo} - # set $HOME for bzr so it can create its trace file - export HOME=$(mktemp -d) - ''; - - postInstall = '' - mkdir -p $out/nix-support - for i in $out/bin/*; do - read -n 4 chars < $i - if [[ $chars =~ ELF ]]; then continue; fi - wrapProgram $i \ - --prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \ - --prefix PATH ':' $out/bin:$hydraPath \ - --set-default HYDRA_RELEASE ${version} \ - --set HYDRA_HOME $out/libexec/hydra \ - --set NIX_RELEASE ${nix.name or "unknown"} - done - ''; # */ - - dontStrip = true; - - doCheck = true; - - passthru = { - inherit perlDeps; - tests.basic = nixosTests.hydra.hydra-unstable; - }; - - patches = [ - (fetchpatch { - url = "https://github.com/NixOS/hydra/commit/5ae26aa7604f714dcc73edcb74fe71ddc8957f6c.patch"; - sha256 = "sha256-wkbWo8SFbT3qwVxwkKQWpQT5Jgb1Bb51yiLTlFdDN/I="; - }) - ]; - - meta = with lib; { - description = "Nix-based continuous build system"; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ lheckemann mindavi das_j ]; - }; - } + }; +in +stdenv.mkDerivation rec { + pname = "hydra"; + + version = "2022-02-07"; + + src = fetchFromGitHub { + owner = "NixOS"; + repo = "hydra"; + rev = "517dce285a851efd732affc084c7083aed2e98cd"; + sha256 = "sha256-abWhd/VLNse3Gz7gcVbFANJLAhHV4nbOKjhVDmq/Zmg="; + }; + + buildInputs = [ + makeWrapper + autoconf + automake + libtool + unzip + nukeReferences + sqlite + libpqxx_6 + top-git + mercurial + darcs + subversion + breezy + openssl + bzip2 + libxslt + perlDeps + perl + nix + postgresql # for running the tests + nlohmann_json + boost + pixz + ]; + + hydraPath = lib.makeBinPath ([ + sqlite + subversion + openssh + nix + coreutils + findutils + pixz + gzip + bzip2 + xz + gnutar + unzip + git + top-git + mercurial /*darcs*/ + gnused + breezy + ] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ]); + + nativeBuildInputs = [ autoreconfHook pkg-config mdbook ]; + + configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; + + checkInputs = [ + cacert + foreman + glibcLocales + python3 + libressl.nc + ]; + + NIX_CFLAGS_COMPILE = "-pthread"; + + shellHook = '' + PATH=$(pwd)/src/script:$(pwd)/src/hydra-eval-jobs:$(pwd)/src/hydra-queue-runner:$(pwd)/src/hydra-evaluator:$PATH + PERL5LIB=$(pwd)/src/lib:$PERL5LIB; + ''; + + enableParallelBuilding = true; + + preCheck = '' + patchShebangs . + export LOGNAME=''${LOGNAME:-foo} + # set $HOME for bzr so it can create its trace file + export HOME=$(mktemp -d) + ''; + + postInstall = '' + mkdir -p $out/nix-support + for i in $out/bin/*; do + read -n 4 chars < $i + if [[ $chars =~ ELF ]]; then continue; fi + wrapProgram $i \ + --prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \ + --prefix PATH ':' $out/bin:$hydraPath \ + --set-default HYDRA_RELEASE ${version} \ + --set HYDRA_HOME $out/libexec/hydra \ + --set NIX_RELEASE ${nix.name or "unknown"} + done + ''; # */ + + dontStrip = true; + + doCheck = true; + + passthru = { + inherit perlDeps; + tests.basic = nixosTests.hydra.hydra-unstable; + }; + + patches = [ + (fetchpatch { + url = "https://github.com/NixOS/hydra/commit/5ae26aa7604f714dcc73edcb74fe71ddc8957f6c.patch"; + sha256 = "sha256-wkbWo8SFbT3qwVxwkKQWpQT5Jgb1Bb51yiLTlFdDN/I="; + }) + ]; + + meta = with lib; { + description = "Nix-based continuous build system"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ lheckemann mindavi das_j ]; + }; +} From 0c6017869a16bbc241d7d65cb1f16d21587e1de5 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Thu, 27 Jan 2022 15:20:03 -0800 Subject: [PATCH 7/7] hydra-unstable -> hydra_unstable --- maintainers/scripts/haskell/hydra-report.hs | 2 +- .../modules/services/continuous-integration/hydra/default.nix | 4 ++-- nixos/tests/hydra/default.nix | 2 +- pkgs/development/tools/misc/hydra/unstable.nix | 2 +- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/release-haskell.nix | 2 +- 7 files changed, 8 insertions(+), 7 deletions(-) diff --git a/maintainers/scripts/haskell/hydra-report.hs b/maintainers/scripts/haskell/hydra-report.hs index 360b9f2058de795..6f154d90f06f9af 100755 --- a/maintainers/scripts/haskell/hydra-report.hs +++ b/maintainers/scripts/haskell/hydra-report.hs @@ -1,6 +1,6 @@ #! /usr/bin/env nix-shell #! nix-shell -p "haskellPackages.ghcWithPackages (p: [p.aeson p.req])" -#! nix-shell -p hydra-unstable +#! nix-shell -p hydra_unstable #! nix-shell -i runhaskell {- diff --git a/nixos/modules/services/continuous-integration/hydra/default.nix b/nixos/modules/services/continuous-integration/hydra/default.nix index cc5de97d6d10d79..39eff579436786a 100644 --- a/nixos/modules/services/continuous-integration/hydra/default.nix +++ b/nixos/modules/services/continuous-integration/hydra/default.nix @@ -99,8 +99,8 @@ in package = mkOption { type = types.package; - default = pkgs.hydra-unstable; - defaultText = literalExpression "pkgs.hydra-unstable"; + default = pkgs.hydra_unstable; + defaultText = literalExpression "pkgs.hydra_unstable"; description = "The Hydra package."; }; diff --git a/nixos/tests/hydra/default.nix b/nixos/tests/hydra/default.nix index ef5e677953dcd3d..063fab20c8e4a71 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-unstable; + inherit (pkgs) hydra_unstable; }; makeHydraTest = with pkgs.lib; name: package: makeTest { diff --git a/pkgs/development/tools/misc/hydra/unstable.nix b/pkgs/development/tools/misc/hydra/unstable.nix index e3934a5e74a63e1..629d3c8409131c1 100644 --- a/pkgs/development/tools/misc/hydra/unstable.nix +++ b/pkgs/development/tools/misc/hydra/unstable.nix @@ -229,7 +229,7 @@ stdenv.mkDerivation rec { passthru = { inherit perlDeps; - tests.basic = nixosTests.hydra.hydra-unstable; + tests.basic = nixosTests.hydra.hydra_unstable; }; patches = [ diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index e5e2cc5637c3404..992418f51164f5b 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -470,6 +470,7 @@ mapAliases ({ htmlTidy = html-tidy; # Added 2014-12-06 ht-rust = xh; # Added 2021-02-13 hydra-flakes = throw "hydra-flakes: Flakes support has been merged into Hydra's master. Please use `hydra-unstable` now."; # Added 2020-04-06 + hydra-unstable = hydra_unstable; # added 2022-01-27 ### I ### diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7d906bb2c7209db..8b07f63ce8edd5e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17241,7 +17241,7 @@ with pkgs; hwloc = callPackage ../development/libraries/hwloc {}; - hydra-unstable = callPackage ../development/tools/misc/hydra/unstable.nix { nix = nix_2_4; }; + hydra_unstable = callPackage ../development/tools/misc/hydra/unstable.nix { nix = nix_2_4; }; hydra-cli = callPackage ../development/tools/misc/hydra-cli { }; diff --git a/pkgs/top-level/release-haskell.nix b/pkgs/top-level/release-haskell.nix index 82828a3d611e8f7..de8beaeba14cd4d 100644 --- a/pkgs/top-level/release-haskell.nix +++ b/pkgs/top-level/release-haskell.nix @@ -4,7 +4,7 @@ https://hydra.nixos.org/jobset/nixpkgs/haskell-updates. To debug this expression you can use `hydra-eval-jobs` from - `pkgs.hydra-unstable` which prints the jobset description + `pkgs.hydra_unstable` which prints the jobset description to `stdout`: $ hydra-eval-jobs -I . pkgs/top-level/release-haskell.nix