From 55760e4c10d56283412fff70f047b26379b76e54 Mon Sep 17 00:00:00 2001 From: Sandro Jäckel Date: Thu, 22 Aug 2024 14:57:02 +0200 Subject: hydra: rename from hydra_unstable There is no stable hydra package --- maintainers/scripts/haskell/hydra-report.hs | 2 +- .../continuous-integration/hydra/default.nix | 2 +- nixos/tests/hydra/default.nix | 2 +- pkgs/development/tools/misc/hydra/default.nix | 256 +++++++++++++++++++++ pkgs/development/tools/misc/hydra/unstable.nix | 256 --------------------- pkgs/top-level/aliases.nix | 2 +- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/release-haskell.nix | 2 +- 8 files changed, 262 insertions(+), 262 deletions(-) create mode 100644 pkgs/development/tools/misc/hydra/default.nix delete mode 100644 pkgs/development/tools/misc/hydra/unstable.nix diff --git a/maintainers/scripts/haskell/hydra-report.hs b/maintainers/scripts/haskell/hydra-report.hs index debf684abf50..ebcb576d5521 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 #! 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 b516c3d6192c..be7dffa72f38 100644 --- a/nixos/modules/services/continuous-integration/hydra/default.nix +++ b/nixos/modules/services/continuous-integration/hydra/default.nix @@ -97,7 +97,7 @@ in ''; }; - package = mkPackageOption pkgs "hydra_unstable" { }; + package = mkPackageOption pkgs "hydra" { }; hydraURL = mkOption { type = types.str; diff --git a/nixos/tests/hydra/default.nix b/nixos/tests/hydra/default.nix index 98c3c6fbae9f..0f5092f19653 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; }; makeHydraTest = with pkgs.lib; name: package: makeTest { diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix new file mode 100644 index 000000000000..d198bdaa4a23 --- /dev/null +++ b/pkgs/development/tools/misc/hydra/default.nix @@ -0,0 +1,256 @@ +{ stdenv +, lib +, fetchpatch2 +, nix +, perlPackages +, buildEnv +, makeWrapper +, unzip +, pkg-config +, libpqxx +, top-git +, mercurial +, darcs +, subversion +, breezy +, openssl +, bzip2 +, libxslt +, perl +, postgresql +, prometheus-cpp +, nukeReferences +, git +, nlohmann_json +, docbook_xsl +, openssh +, openldap +, gnused +, coreutils +, findutils +, gzip +, xz +, gnutar +, rpm +, dpkg +, cdrkit +, pixz +, boost +, autoreconfHook +, mdbook +, foreman +, python3 +, libressl +, cacert +, glibcLocales +, fetchFromGitHub +, nixosTests +}: + +let + perlDeps = buildEnv { + name = "hydra-perl-deps"; + paths = with perlPackages; lib.closePropagation + [ + AuthenSASL + CatalystActionREST + CatalystAuthenticationStoreDBIxClass + CatalystAuthenticationStoreLDAP + CatalystDevel + CatalystPluginAccessLog + CatalystPluginAuthorizationRoles + CatalystPluginCaptcha + CatalystPluginPrometheusTiny + CatalystPluginSessionStateCookie + CatalystPluginSessionStoreFastMmap + CatalystPluginStackTrace + CatalystRuntime + CatalystTraitForRequestProxyBase + CatalystViewDownload + CatalystViewJSON + CatalystViewTT + CatalystXScriptServerStarman + CatalystXRoleApplicator + CryptPassphrase + CryptPassphraseArgon2 + CryptRandPasswd + DBDPg + DBDSQLite + DataDump + DateTime + DigestSHA1 + EmailMIME + EmailSender + FileLibMagic + FileSlurper + FileWhich + IOCompress + IPCRun + IPCRun3 + JSON + JSONMaybeXS + JSONXS + ListSomeUtils + LWP + LWPProtocolHttps + ModulePluggable + NetAmazonS3 + NetPrometheus + NetStatsd + PadWalker + ParallelForkManager + PerlCriticCommunity + PrometheusTinyShared + ReadonlyX + SQLSplitStatement + SetScalar + Starman + StringCompareConstantTime + SysHostnameLong + TermSizeAny + TermReadKey + Test2Harness + TestPostgreSQL + TestSimple13 + TextDiff + TextTable + UUID4Tiny + XMLSimple + YAML + nix.perl-bindings + git + ]; + }; +in +stdenv.mkDerivation (finalAttrs: { + pname = "hydra"; + version = "2024-08-20"; + + src = fetchFromGitHub { + owner = "NixOS"; + repo = "hydra"; + rev = "4bb2f08be14ff86d57b94b520a6cd2181efaee36"; + hash = "sha256-NzsqjLSobba4BJ5FS3vccC9rAH0OE9XI97geGj0KHts="; + }; + + patches = [ + (fetchpatch2 { + url = "https://github.com/NixOS/hydra/commit/916531dc9ccee52e6dab256232933fcf6d198158.patch"; + hash = "sha256-JOtlYr+K934UIqHvfLMd/jfRRU+Tci0kvtyhOvlwxEs="; + }) + (fetchpatch2 { + name = "CVE-2024-45049.patch"; + url = "https://github.com/NixOS/hydra/commit/f73043378907c2c7e44f633ad764c8bdd1c947d5.patch"; + hash = "sha256-IS6GCuRLW+ULDD7udpGX2tO85bV2gGOX6DLLw3NTkJU="; + }) + ]; + + buildInputs = [ + unzip + libpqxx + top-git + mercurial + darcs + subversion + breezy + openssl + bzip2 + libxslt + nix + perlDeps + perl + pixz + boost + postgresql + nlohmann_json + prometheus-cpp + ]; + + hydraPath = lib.makeBinPath ( + [ + 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 + makeWrapper + pkg-config + mdbook + nukeReferences + ]; + + nativeCheckInputs = [ + cacert + foreman + glibcLocales + python3 + libressl.nc + openldap + ]; + + configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; + + env.NIX_CFLAGS_COMPILE = "-pthread"; + + OPENLDAP_ROOT = openldap; + + 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 ${finalAttrs.version} \ + --set HYDRA_HOME $out/libexec/hydra \ + --set NIX_RELEASE ${nix.name or "unknown"} + done + ''; + + doCheck = true; + + passthru = { + inherit nix perlDeps; + tests.basic = nixosTests.hydra.hydra; + }; + + meta = with lib; { + description = "Nix-based continuous build system"; + homepage = "https://nixos.org/hydra"; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = with maintainers; [ mindavi ] ++ teams.helsinki-systems.members; + }; +}) diff --git a/pkgs/development/tools/misc/hydra/unstable.nix b/pkgs/development/tools/misc/hydra/unstable.nix deleted file mode 100644 index 5305c9854f9d..000000000000 --- a/pkgs/development/tools/misc/hydra/unstable.nix +++ /dev/null @@ -1,256 +0,0 @@ -{ stdenv -, lib -, fetchpatch2 -, nix -, perlPackages -, buildEnv -, makeWrapper -, unzip -, pkg-config -, libpqxx -, top-git -, mercurial -, darcs -, subversion -, breezy -, openssl -, bzip2 -, libxslt -, perl -, postgresql -, prometheus-cpp -, nukeReferences -, git -, nlohmann_json -, docbook_xsl -, openssh -, openldap -, gnused -, coreutils -, findutils -, gzip -, xz -, gnutar -, rpm -, dpkg -, cdrkit -, pixz -, boost -, autoreconfHook -, mdbook -, foreman -, python3 -, libressl -, cacert -, glibcLocales -, fetchFromGitHub -, nixosTests -}: - -let - perlDeps = buildEnv { - name = "hydra-perl-deps"; - paths = with perlPackages; lib.closePropagation - [ - AuthenSASL - CatalystActionREST - CatalystAuthenticationStoreDBIxClass - CatalystAuthenticationStoreLDAP - CatalystDevel - CatalystPluginAccessLog - CatalystPluginAuthorizationRoles - CatalystPluginCaptcha - CatalystPluginPrometheusTiny - CatalystPluginSessionStateCookie - CatalystPluginSessionStoreFastMmap - CatalystPluginStackTrace - CatalystRuntime - CatalystTraitForRequestProxyBase - CatalystViewDownload - CatalystViewJSON - CatalystViewTT - CatalystXScriptServerStarman - CatalystXRoleApplicator - CryptPassphrase - CryptPassphraseArgon2 - CryptRandPasswd - DBDPg - DBDSQLite - DataDump - DateTime - DigestSHA1 - EmailMIME - EmailSender - FileLibMagic - FileSlurper - FileWhich - IOCompress - IPCRun - IPCRun3 - JSON - JSONMaybeXS - JSONXS - ListSomeUtils - LWP - LWPProtocolHttps - ModulePluggable - NetAmazonS3 - NetPrometheus - NetStatsd - PadWalker - ParallelForkManager - PerlCriticCommunity - PrometheusTinyShared - ReadonlyX - SQLSplitStatement - SetScalar - Starman - StringCompareConstantTime - SysHostnameLong - TermSizeAny - TermReadKey - Test2Harness - TestPostgreSQL - TestSimple13 - TextDiff - TextTable - UUID4Tiny - XMLSimple - YAML - nix.perl-bindings - git - ]; - }; -in -stdenv.mkDerivation (finalAttrs: { - pname = "hydra"; - version = "2024-08-20"; - - src = fetchFromGitHub { - owner = "NixOS"; - repo = "hydra"; - rev = "4bb2f08be14ff86d57b94b520a6cd2181efaee36"; - hash = "sha256-NzsqjLSobba4BJ5FS3vccC9rAH0OE9XI97geGj0KHts="; - }; - - patches = [ - (fetchpatch2 { - url = "https://github.com/NixOS/hydra/commit/916531dc9ccee52e6dab256232933fcf6d198158.patch"; - hash = "sha256-JOtlYr+K934UIqHvfLMd/jfRRU+Tci0kvtyhOvlwxEs="; - }) - (fetchpatch2 { - name = "CVE-2024-45049.patch"; - url = "https://github.com/NixOS/hydra/commit/f73043378907c2c7e44f633ad764c8bdd1c947d5.patch"; - hash = "sha256-IS6GCuRLW+ULDD7udpGX2tO85bV2gGOX6DLLw3NTkJU="; - }) - ]; - - buildInputs = [ - unzip - libpqxx - top-git - mercurial - darcs - subversion - breezy - openssl - bzip2 - libxslt - nix - perlDeps - perl - pixz - boost - postgresql - nlohmann_json - prometheus-cpp - ]; - - hydraPath = lib.makeBinPath ( - [ - 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 - makeWrapper - pkg-config - mdbook - nukeReferences - ]; - - nativeCheckInputs = [ - cacert - foreman - glibcLocales - python3 - libressl.nc - openldap - ]; - - configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ]; - - env.NIX_CFLAGS_COMPILE = "-pthread"; - - OPENLDAP_ROOT = openldap; - - 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 ${finalAttrs.version} \ - --set HYDRA_HOME $out/libexec/hydra \ - --set NIX_RELEASE ${nix.name or "unknown"} - done - ''; - - doCheck = true; - - passthru = { - inherit nix perlDeps; - tests.basic = nixosTests.hydra.hydra_unstable; - }; - - meta = with lib; { - description = "Nix-based continuous build system"; - homepage = "https://nixos.org/hydra"; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = with maintainers; [ mindavi ] ++ teams.helsinki-systems.members; - }; -}) diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 42922aa6f19c..32ef3afdf33a 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -649,7 +649,7 @@ mapAliases ({ hip-nvidia = throw "'hip-nvidia' has been removed in favor of 'rocmPackages.clr'"; # Added 2023-10-08 hll2390dw-cups = throw "The hll2390dw-cups package was dropped since it was unmaintained."; # Added 2024-06-21 ht-rust = xh; # Added 2021-02-13 - hydra-unstable = hydra_unstable; # added 2022-05-10 + hydra_unstable = hydra; # Added 2024-08-22 hydron = throw "hydron has been removed as the project has been archived upstream since 2022 and is affected by a severe remote code execution vulnerability"; hyper-haskell = throw "'hyper-haskell' has been removed. reason: has been broken for a long time and depends on an insecure electron version"; # Added 2024-03-14 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d7124449ad84..58b148d10075 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20764,7 +20764,7 @@ with pkgs; hwloc = callPackage ../development/libraries/hwloc { }; - hydra_unstable = callPackage ../development/tools/misc/hydra/unstable.nix { nix = nixVersions.nix_2_22; }; + hydra = callPackage ../development/tools/misc/hydra { nix = nixVersions.nix_2_22; }; 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 7774800660e6..4977efe4a458 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` which prints the jobset description to `stdout`: $ hydra-eval-jobs -I . pkgs/top-level/release-haskell.nix -- cgit 1.4.1