2022-05-18 14:49:53 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, nix
|
|
|
|
, perlPackages
|
|
|
|
, buildEnv
|
|
|
|
, makeWrapper
|
|
|
|
, unzip
|
|
|
|
, pkg-config
|
2022-06-16 17:23:12 +00:00
|
|
|
, libpqxx
|
2022-05-18 14:49:53 +00:00
|
|
|
, top-git
|
|
|
|
, mercurial
|
|
|
|
, darcs
|
|
|
|
, subversion
|
|
|
|
, breezy
|
|
|
|
, openssl
|
|
|
|
, bzip2
|
|
|
|
, libxslt
|
|
|
|
, perl
|
|
|
|
, postgresql
|
2022-06-16 17:23:12 +00:00
|
|
|
, prometheus-cpp
|
2022-05-18 14:49:53 +00:00
|
|
|
, nukeReferences
|
|
|
|
, git
|
|
|
|
, nlohmann_json
|
|
|
|
, docbook_xsl
|
|
|
|
, openssh
|
2022-06-16 17:23:12 +00:00
|
|
|
, openldap
|
2022-05-18 14:49:53 +00:00
|
|
|
, gnused
|
|
|
|
, coreutils
|
|
|
|
, findutils
|
|
|
|
, gzip
|
|
|
|
, xz
|
|
|
|
, gnutar
|
|
|
|
, rpm
|
|
|
|
, dpkg
|
|
|
|
, cdrkit
|
|
|
|
, pixz
|
|
|
|
, boost
|
|
|
|
, autoreconfHook
|
|
|
|
, mdbook
|
|
|
|
, foreman
|
|
|
|
, python3
|
|
|
|
, libressl
|
|
|
|
, cacert
|
|
|
|
, glibcLocales
|
|
|
|
, fetchFromGitHub
|
|
|
|
, nixosTests
|
2024-09-19 14:19:46 +00:00
|
|
|
, unstableGitUpdater
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
perlDeps = buildEnv {
|
|
|
|
name = "hydra-perl-deps";
|
|
|
|
paths = with perlPackages; lib.closePropagation
|
2022-05-18 14:49:53 +00:00
|
|
|
[
|
|
|
|
AuthenSASL
|
2020-04-24 23:36:52 +00:00
|
|
|
CatalystActionREST
|
|
|
|
CatalystAuthenticationStoreDBIxClass
|
2022-05-18 14:49:53 +00:00
|
|
|
CatalystAuthenticationStoreLDAP
|
2020-04-24 23:36:52 +00:00
|
|
|
CatalystDevel
|
|
|
|
CatalystPluginAccessLog
|
|
|
|
CatalystPluginAuthorizationRoles
|
|
|
|
CatalystPluginCaptcha
|
2021-08-11 14:56:57 +00:00
|
|
|
CatalystPluginPrometheusTiny
|
2020-04-24 23:36:52 +00:00
|
|
|
CatalystPluginSessionStateCookie
|
|
|
|
CatalystPluginSessionStoreFastMmap
|
|
|
|
CatalystPluginStackTrace
|
|
|
|
CatalystRuntime
|
|
|
|
CatalystTraitForRequestProxyBase
|
|
|
|
CatalystViewDownload
|
|
|
|
CatalystViewJSON
|
|
|
|
CatalystViewTT
|
|
|
|
CatalystXScriptServerStarman
|
|
|
|
CatalystXRoleApplicator
|
2021-05-04 21:07:42 +00:00
|
|
|
CryptPassphrase
|
|
|
|
CryptPassphraseArgon2
|
2020-04-24 23:36:52 +00:00
|
|
|
CryptRandPasswd
|
|
|
|
DBDPg
|
|
|
|
DBDSQLite
|
|
|
|
DataDump
|
|
|
|
DateTime
|
|
|
|
DigestSHA1
|
|
|
|
EmailMIME
|
|
|
|
EmailSender
|
2022-08-21 13:32:41 +00:00
|
|
|
FileLibMagic
|
2022-05-18 14:49:53 +00:00
|
|
|
FileSlurper
|
|
|
|
FileWhich
|
2020-04-24 23:36:52 +00:00
|
|
|
IOCompress
|
|
|
|
IPCRun
|
2022-05-18 14:49:53 +00:00
|
|
|
IPCRun3
|
2020-04-24 23:36:52 +00:00
|
|
|
JSON
|
2022-05-18 14:49:53 +00:00
|
|
|
JSONMaybeXS
|
2020-04-24 23:36:52 +00:00
|
|
|
JSONXS
|
2022-05-18 14:49:53 +00:00
|
|
|
ListSomeUtils
|
2020-04-24 23:36:52 +00:00
|
|
|
LWP
|
|
|
|
LWPProtocolHttps
|
2022-05-18 14:49:53 +00:00
|
|
|
ModulePluggable
|
2020-04-24 23:36:52 +00:00
|
|
|
NetAmazonS3
|
|
|
|
NetPrometheus
|
|
|
|
NetStatsd
|
|
|
|
PadWalker
|
2022-05-18 14:49:53 +00:00
|
|
|
ParallelForkManager
|
|
|
|
PerlCriticCommunity
|
2021-08-11 14:56:57 +00:00
|
|
|
PrometheusTinyShared
|
2022-05-18 14:49:53 +00:00
|
|
|
ReadonlyX
|
2020-04-24 23:36:52 +00:00
|
|
|
SQLSplitStatement
|
|
|
|
SetScalar
|
|
|
|
Starman
|
2021-05-04 21:07:42 +00:00
|
|
|
StringCompareConstantTime
|
2020-04-24 23:36:52 +00:00
|
|
|
SysHostnameLong
|
|
|
|
TermSizeAny
|
2022-05-18 14:49:53 +00:00
|
|
|
TermReadKey
|
|
|
|
Test2Harness
|
|
|
|
TestPostgreSQL
|
2022-06-16 17:23:12 +00:00
|
|
|
TestSimple13
|
2020-04-24 23:36:52 +00:00
|
|
|
TextDiff
|
|
|
|
TextTable
|
2022-05-18 14:49:53 +00:00
|
|
|
UUID4Tiny
|
2020-04-24 23:36:52 +00:00
|
|
|
XMLSimple
|
2020-10-27 00:29:36 +00:00
|
|
|
YAML
|
2020-04-24 23:36:52 +00:00
|
|
|
nix.perl-bindings
|
|
|
|
git
|
|
|
|
];
|
|
|
|
};
|
2022-05-18 14:49:53 +00:00
|
|
|
in
|
2024-07-27 06:49:29 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "hydra";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0-unstable-2024-09-15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "hydra";
|
2024-09-19 14:19:46 +00:00
|
|
|
rev = "b6f44b5cd020d95c405e149e4c3a0e9dc785e31a";
|
|
|
|
hash = "sha256-dXDOX6IvAeznNoh73P2QWstBJ/jqfzEKjgNvdfsGTuY=";
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
buildInputs = [
|
2024-01-02 11:29:13 +00:00
|
|
|
unzip
|
2022-12-28 21:21:41 +00:00
|
|
|
libpqxx
|
|
|
|
top-git
|
|
|
|
mercurial
|
|
|
|
darcs
|
|
|
|
subversion
|
|
|
|
breezy
|
|
|
|
openssl
|
|
|
|
bzip2
|
|
|
|
libxslt
|
|
|
|
nix
|
|
|
|
perlDeps
|
|
|
|
perl
|
|
|
|
pixz
|
|
|
|
boost
|
|
|
|
postgresql
|
|
|
|
nlohmann_json
|
|
|
|
prometheus-cpp
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hydraPath = lib.makeBinPath (
|
2022-05-18 14:49:53 +00:00
|
|
|
[
|
|
|
|
subversion
|
|
|
|
openssh
|
|
|
|
nix
|
|
|
|
coreutils
|
|
|
|
findutils
|
|
|
|
pixz
|
|
|
|
gzip
|
|
|
|
bzip2
|
|
|
|
xz
|
|
|
|
gnutar
|
|
|
|
unzip
|
|
|
|
git
|
|
|
|
top-git
|
2022-06-16 17:23:12 +00:00
|
|
|
mercurial
|
|
|
|
darcs
|
2022-05-18 14:49:53 +00:00
|
|
|
gnused
|
|
|
|
breezy
|
|
|
|
] ++ lib.optionals stdenv.isLinux [ rpm dpkg cdrkit ]
|
|
|
|
);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
makeWrapper
|
|
|
|
pkg-config
|
|
|
|
mdbook
|
|
|
|
nukeReferences
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-05-18 14:49:53 +00:00
|
|
|
cacert
|
|
|
|
foreman
|
|
|
|
glibcLocales
|
|
|
|
python3
|
|
|
|
libressl.nc
|
2022-06-16 17:23:12 +00:00
|
|
|
openldap
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [ "--with-docbook-xsl=${docbook_xsl}/xml/xsl/docbook" ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
env = {
|
|
|
|
NIX_CFLAGS_COMPILE = "-pthread";
|
|
|
|
OPENLDAP_ROOT = openldap;
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
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}
|
2022-05-18 14:49:53 +00:00
|
|
|
# set $HOME for bzr so it can create its trace file
|
|
|
|
export HOME=$(mktemp -d)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
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 \
|
2024-07-27 06:49:29 +00:00
|
|
|
--set-default HYDRA_RELEASE ${finalAttrs.version} \
|
2020-04-24 23:36:52 +00:00
|
|
|
--set HYDRA_HOME $out/libexec/hydra \
|
|
|
|
--set NIX_RELEASE ${nix.name or "unknown"}
|
|
|
|
done
|
2022-05-18 14:49:53 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
passthru = {
|
2022-06-16 17:23:12 +00:00
|
|
|
inherit nix perlDeps;
|
2024-09-19 14:19:46 +00:00
|
|
|
tests.basic = nixosTests.hydra.hydra;
|
|
|
|
updateScript = unstableGitUpdater {};
|
2022-05-18 14:49:53 +00:00
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Nix-based continuous build system";
|
2023-10-09 19:29:22 +00:00
|
|
|
homepage = "https://nixos.org/hydra";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2024-06-24 18:47:55 +00:00
|
|
|
maintainers = with maintainers; [ mindavi ] ++ teams.helsinki-systems.members;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-07-27 06:49:29 +00:00
|
|
|
})
|