Use buildEnv to combine Hydra's Perl dependencies
This makes the Perl search path ($PERL5LIB) much shorter, cutting down the number of stat() calls when starting hydra-server from ~432000 to ~9000.
This commit is contained in:
parent
e0c411220e
commit
5e0542d3af
41
deps.nix
41
deps.nix
|
@ -1,41 +0,0 @@
|
||||||
{ pkgs }:
|
|
||||||
|
|
||||||
with pkgs;
|
|
||||||
|
|
||||||
[ perlPackages.CatalystAuthenticationStoreDBIxClass
|
|
||||||
perlPackages.CatalystPluginAccessLog
|
|
||||||
perlPackages.CatalystPluginAuthorizationRoles
|
|
||||||
perlPackages.CatalystPluginCaptcha
|
|
||||||
perlPackages.CatalystPluginSessionStateCookie
|
|
||||||
perlPackages.CatalystPluginSessionStoreFastMmap
|
|
||||||
perlPackages.CatalystPluginStackTrace
|
|
||||||
perlPackages.CatalystViewDownload
|
|
||||||
perlPackages.CatalystViewJSON
|
|
||||||
perlPackages.CatalystViewTT
|
|
||||||
perlPackages.CatalystXScriptServerStarman
|
|
||||||
perlPackages.CatalystTraitForRequestProxyBase
|
|
||||||
perlPackages.CryptRandPasswd
|
|
||||||
perlPackages.DBDPg
|
|
||||||
perlPackages.DBDSQLite
|
|
||||||
perlPackages.DataDump
|
|
||||||
perlPackages.DateTime
|
|
||||||
perlPackages.DigestSHA1
|
|
||||||
perlPackages.EmailSender
|
|
||||||
perlPackages.FileSlurp
|
|
||||||
perlPackages.IOCompress
|
|
||||||
perlPackages.IPCRun
|
|
||||||
perlPackages.JSONXS
|
|
||||||
perlPackages.PadWalker
|
|
||||||
perlPackages.CatalystDevel
|
|
||||||
perlPackages.Readonly
|
|
||||||
perlPackages.SQLSplitStatement
|
|
||||||
perlPackages.Starman
|
|
||||||
perlPackages.Switch # XXX: seems to be an indirect dep of `hydra-build'
|
|
||||||
perlPackages.SysHostnameLong
|
|
||||||
perlPackages.TestMore
|
|
||||||
perlPackages.TextDiff
|
|
||||||
perlPackages.TextTable
|
|
||||||
perlPackages.XMLSimple
|
|
||||||
nixUnstable
|
|
||||||
guile # optional, for Guile + Guix support
|
|
||||||
]
|
|
|
@ -93,11 +93,6 @@
|
||||||
delete from builds where finished = 0 and not exists (select 1 from buildschedulinginfo s where s.id = builds.id and busy = 1);
|
delete from builds where finished = 0 and not exists (select 1 from buildschedulinginfo s where s.id = builds.id and busy = 1);
|
||||||
|
|
||||||
|
|
||||||
* Installing deps.nix in a profile for testing:
|
|
||||||
|
|
||||||
$ nix-env -p $NIX_USER_PROFILE_DIR/hydra-deps -f deps.nix -i \* --arg pkgs 'import /etc/nixos/nixpkgs {}'
|
|
||||||
|
|
||||||
|
|
||||||
* select x.project, x.jobset, x.job, x.system, x.id, x.timestamp, r.buildstatus, b.id, b.timestamp
|
* select x.project, x.jobset, x.job, x.system, x.id, x.timestamp, r.buildstatus, b.id, b.timestamp
|
||||||
from (select project, jobset, job, system, max(id) as id from Builds where finished = 1 group by project, jobset, job, system) as a_
|
from (select project, jobset, job, system, max(id) as id from Builds where finished = 1 group by project, jobset, job, system) as a_
|
||||||
natural join Builds x
|
natural join Builds x
|
||||||
|
|
55
release.nix
55
release.nix
|
@ -47,7 +47,52 @@ rec {
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
let nix = nixUnstable; in
|
let
|
||||||
|
|
||||||
|
nix = nixUnstable;
|
||||||
|
|
||||||
|
perlDeps = buildEnv {
|
||||||
|
name = "hydra-perl-deps";
|
||||||
|
paths = with perlPackages;
|
||||||
|
[ CatalystAuthenticationStoreDBIxClass
|
||||||
|
CatalystPluginAccessLog
|
||||||
|
CatalystPluginAuthorizationRoles
|
||||||
|
CatalystPluginCaptcha
|
||||||
|
CatalystPluginSessionStateCookie
|
||||||
|
CatalystPluginSessionStoreFastMmap
|
||||||
|
CatalystPluginStackTrace
|
||||||
|
CatalystViewDownload
|
||||||
|
CatalystViewJSON
|
||||||
|
CatalystViewTT
|
||||||
|
CatalystXScriptServerStarman
|
||||||
|
CatalystTraitForRequestProxyBase
|
||||||
|
CryptRandPasswd
|
||||||
|
DBDPg
|
||||||
|
DBDSQLite
|
||||||
|
DataDump
|
||||||
|
DateTime
|
||||||
|
DigestSHA1
|
||||||
|
EmailSender
|
||||||
|
FileSlurp
|
||||||
|
IOCompress
|
||||||
|
IPCRun
|
||||||
|
JSONXS
|
||||||
|
PadWalker
|
||||||
|
CatalystDevel
|
||||||
|
Readonly
|
||||||
|
SQLSplitStatement
|
||||||
|
Starman
|
||||||
|
Switch # XXX: seems to be an indirect dep of `hydra-build'
|
||||||
|
SysHostnameLong
|
||||||
|
TestMore
|
||||||
|
TextDiff
|
||||||
|
TextTable
|
||||||
|
XMLSimple
|
||||||
|
nix git
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
releaseTools.nixBuild {
|
releaseTools.nixBuild {
|
||||||
name = "hydra";
|
name = "hydra";
|
||||||
|
@ -55,9 +100,11 @@ rec {
|
||||||
configureFlags = "--with-nix=${nix}";
|
configureFlags = "--with-nix=${nix}";
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ perl makeWrapper libtool nix unzip nukeReferences pkgconfig boehmgc sqlite
|
[ makeWrapper libtool unzip nukeReferences pkgconfig boehmgc sqlite
|
||||||
git gitAndTools.topGit mercurial subversion bazaar openssl bzip2
|
gitAndTools.topGit mercurial subversion bazaar openssl bzip2
|
||||||
] ++ (import ./deps.nix) { inherit pkgs; };
|
guile # optional, for Guile + Guix support
|
||||||
|
perl perlDeps
|
||||||
|
];
|
||||||
|
|
||||||
hydraPath = lib.makeSearchPath "bin" (
|
hydraPath = lib.makeSearchPath "bin" (
|
||||||
[ libxslt sqlite subversion openssh nix coreutils findutils
|
[ libxslt sqlite subversion openssh nix coreutils findutils
|
||||||
|
|
Loading…
Reference in a new issue