diff options
author | Eric Bavier <bavier@member.fsf.org> | 2015-04-19 12:59:37 -0500 |
---|---|---|
committer | Eric Bavier <bavier@member.fsf.org> | 2015-06-13 08:05:01 -0500 |
commit | 0061079a19c9ac38a2d2a170bcfea17fd362d15e (patch) | |
tree | 11f848c532f06b0445a77a5d09276eaf9c099e49 | |
parent | 6e545bbf5565b6273423ac50187e2c50f84399b0 (diff) | |
download | gnu-guix-0061079a19c9ac38a2d2a170bcfea17fd362d15e.tar gnu-guix-0061079a19c9ac38a2d2a170bcfea17fd362d15e.tar.gz |
gnu: Add hydra.
* gnu/packages/ci.scm: New file.
* gnu/packages/patches/hydra-automake-1.15.patch,
gnu/packages/patches/hydra-disable-darcs-test.patch: New files.
* gnu-system.am (GNU_SYSTEM_MODULES): Add file.
(dist_patch_DATA): Add patches.
-rw-r--r-- | gnu-system.am | 3 | ||||
-rw-r--r-- | gnu/packages/ci.scm | 182 | ||||
-rw-r--r-- | gnu/packages/patches/hydra-automake-1.15.patch | 63 | ||||
-rw-r--r-- | gnu/packages/patches/hydra-disable-darcs-test.patch | 25 |
4 files changed, 273 insertions, 0 deletions
diff --git a/gnu-system.am b/gnu-system.am index d79c2c7917..7e0ee52875 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -59,6 +59,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/cdrom.scm \ gnu/packages/certs.scm \ gnu/packages/check.scm \ + gnu/packages/ci.scm \ gnu/packages/cmake.scm \ gnu/packages/code.scm \ gnu/packages/commencement.scm \ @@ -454,6 +455,8 @@ dist_patch_DATA = \ gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \ gnu/packages/patches/hop-bigloo-4.0b.patch \ gnu/packages/patches/hop-linker-flags.patch \ + gnu/packages/patches/hydra-automake-1.15.patch \ + gnu/packages/patches/hydra-disable-darcs-test.patch \ gnu/packages/patches/irrlicht-mesa-10.patch \ gnu/packages/patches/jbig2dec-ignore-testtest.patch \ gnu/packages/patches/kmod-module-directory.patch \ diff --git a/gnu/packages/ci.scm b/gnu/packages/ci.scm new file mode 100644 index 0000000000..b68e0dce3b --- /dev/null +++ b/gnu/packages/ci.scm @@ -0,0 +1,182 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages ci) + #:use-module ((guix licenses) #:prefix l:) + #:use-module (gnu packages) + #:use-module (guix packages) + #:use-module (guix git-download) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages docbook) + #:use-module (gnu packages compression) + #:use-module (gnu packages databases) + #:use-module (gnu packages guile) + #:use-module (gnu packages mail) + #:use-module (gnu packages openssl) + #:use-module (gnu packages package-management) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages version-control) + #:use-module (gnu packages web) + #:use-module (gnu packages xml) + #:use-module (gnu packages zip) + #:use-module (guix build-system gnu)) + +(define-public hydra + (let ((commit "4c0e3e4")) + (package + (name "hydra") + (version (string-append "20150407." commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/NixOS/hydra") + (commit commit))) + (file-name (string-append name "-" version)) + (sha256 + (base32 + "08vc76xb7f42hh65j7qvjf58hw36aki5ml343170pq94vk75b1nh")) + (patches (map search-patch + '("hydra-automake-1.15.patch" + ;; TODO: Remove once we have a darcs input + "hydra-disable-darcs-test.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("unzip" ,unzip) + ("pkg-config" ,pkg-config) + ;; For documentation + ("dblatex" ,dblatex) + ("xsltproc" ,libxslt) + ("docbook-xsl" ,docbook-xsl) + ;; For bootstrap + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ;; For tests + ("git" ,git) + ("subversion" ,subversion) + ("mercurial" ,mercurial) + ("bazaar" ,bazaar))) + (inputs + `(("perl" ,perl) + ("guile" ,guile-2.0) + ("openssl" ,openssl) + ("bzip2" ,bzip2) + ("gzip" ,gzip) + ("sed" ,sed) + ("starman" ,starman) + ("git" ,git) + ("subversion" ,subversion) + ("mercurial" ,mercurial) + ("bazaar" ,bazaar) + ("nix" ,nix) + ;; Lots o' perl modules... + ("perl-catalyst-action-rest" ,perl-catalyst-action-rest) + ("perl-catalyst-authentication-store-dbix-class" + ,perl-catalyst-authentication-store-dbix-class) + ("perl-catalyst-devel" ,perl-catalyst-devel) + ("perl-catalyst-dispatchtype-regex" ,perl-catalyst-dispatchtype-regex) + ("perl-catalyst-plugin-accesslog" ,perl-catalyst-plugin-accesslog) + ("perl-catalyst-plugin-authorization-roles" + ,perl-catalyst-plugin-authorization-roles) + ("perl-catalyst-plugin-captcha" ,perl-catalyst-plugin-captcha) + ("perl-catalyst-plugin-session-state-cookie" + ,perl-catalyst-plugin-session-state-cookie) + ("perl-catalyst-plugin-session-store-fastmmap" + ,perl-catalyst-plugin-session-store-fastmmap) + ("perl-catalyst-plugin-stacktrace" ,perl-catalyst-plugin-stacktrace) + ("perl-catalyst-traitfor-request-proxybase" + ,perl-catalyst-traitfor-request-proxybase) + ("perl-catalyst-view-download" ,perl-catalyst-view-download) + ("perl-catalyst-view-json" ,perl-catalyst-view-json) + ("perl-catalyst-view-tt" ,perl-catalyst-view-tt) + ("perl-catalystx-roleapplicator" ,perl-catalystx-roleapplicator) + ("perl-catalystx-script-server-starman" + ,perl-catalystx-script-server-starman) + ("perl-crypt-randpasswd" ,perl-crypt-randpasswd) + ("perl-data-dump" ,perl-data-dump) + ("perl-datetime" ,perl-datetime) + ("perl-dbd-pg" ,perl-dbd-pg) + ("perl-dbd-sqlite" ,perl-dbd-sqlite) + ("perl-digest-sha1" ,perl-digest-sha1) + ("perl-email-mime" ,perl-email-mime) + ("perl-email-sender" ,perl-email-sender) + ("perl-file-slurp" ,perl-file-slurp) + ("perl-io-compress" ,perl-io-compress) + ("perl-ipc-run" ,perl-ipc-run) + ("perl-json-any" ,perl-json-any) + ("perl-json-xs" ,perl-json-xs) + ("perl-libwww" ,perl-libwww) + ("perl-lwp-protocol-https" ,perl-lwp-protocol-https) + ("perl-net-amazon-s3" ,perl-net-amazon-s3) + ("perl-padwalker" ,perl-padwalker) + ("perl-readonly" ,perl-readonly) + ("perl-set-scalar" ,perl-set-scalar) + ("perl-sql-splitstatement" ,perl-sql-splitstatement) + ("perl-sys-hostname-long" ,perl-sys-hostname-long) + ("perl-text-diff" ,perl-text-diff) + ("perl-text-table" ,perl-text-table) + ("perl-xml-simple" ,perl-xml-simple))) + (arguments + `(#:configure-flags + (let ((docbook (assoc-ref %build-inputs "docbook-xsl"))) + (list (string-append "--with-docbook-xsl=" + docbook "/xml/xsl/docbook-xsl-" + ,(package-version docbook-xsl)) + (string-append "--docdir=" %output + "/doc/hydra-" ,version))) + #:phases (modify-phases %standard-phases + (add-after + 'unpack 'bootstrap + (lambda _ (zero? (system* "autoreconf" "-vfi")))) + (add-before + 'check 'check-setup + (lambda _ (setenv "LOGNAME" "test.log"))) + (add-after + 'install 'wrap-program + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (for-each + (lambda (file) + (wrap-program file + `("PATH" ":" prefix + (,(string-append out "/bin") + ,@(map (lambda (i) + (string-append (assoc-ref inputs i) + "/bin")) + '("subversion" "git" "bazaar" + "mercurial" "coreutils" "gzip" + "sed" "unzip" "nix")))) + `("PERL5LIB" ":" prefix + (,(string-append out "/libexec/hydra/lib") + ,@(search-path-as-string->list + (getenv "PERL5LIB")))) + `("HYDRA_RELEASE" = (,,version)) + `("HYDRA_HOME" = + (,(string-append out "/libexec/hydra"))) + `("NIX_RELEASE" = (,,(package-version nix))))) + (find-files (string-append out "/bin") + ".*")))))))) + (home-page "https://nixos.org/hydra") + (synopsis "Continuous build system") + (description + "Hydra is a tool for continuous integration testing and software +release that uses a purely functional language to describe build jobs and +their dependencies.") + (license l:gpl3+)))) diff --git a/gnu/packages/patches/hydra-automake-1.15.patch b/gnu/packages/patches/hydra-automake-1.15.patch new file mode 100644 index 0000000000..0d8fa98519 --- /dev/null +++ b/gnu/packages/patches/hydra-automake-1.15.patch @@ -0,0 +1,63 @@ +This patch takes a slightly different approach to solving the issue reported +at https://github.com/NixOS/hydra/issues/200. This fix allows us to use +Automake's parallel test harness. + +--- source/configure.ac.orig 1969-12-31 18:00:01.000000000 -0600 ++++ source/configure.ac 2015-04-15 10:58:15.974679278 -0500 +@@ -33,7 +33,7 @@ + fi + ]) + +-NEED_PROG(perl, perl) ++NEED_PROG([PERL], perl) + + NEED_PROG([NIX_STORE_PROGRAM], [nix-store]) + +--- source/tests/Makefile.am.orig 1969-12-31 18:00:01.000000000 -0600 ++++ source/tests/Makefile.am 2015-04-15 11:00:35.846682904 -0500 +@@ -1,19 +1,20 @@ +-TESTS_ENVIRONMENT = \ +- BZR_HOME="$(abs_builddir)/data" \ +- HYDRA_DBI="dbi:SQLite:db.sqlite" \ +- HYDRA_DATA="$(abs_builddir)/data" \ +- HYDRA_HOME="$(top_srcdir)/src" \ +- HYDRA_CONFIG= \ +- NIX_REMOTE= \ +- NIX_CONF_DIR="$(abs_builddir)/nix/etc/nix" \ +- NIX_STATE_DIR="$(abs_builddir)/nix/var/nix" \ +- NIX_MANIFESTS_DIR="$(abs_builddir)/nix/var/nix/manifests" \ +- NIX_STORE_DIR="$(abs_builddir)/nix/store" \ +- NIX_LOG_DIR="$(abs_builddir)/nix/var/log/nix" \ +- NIX_BUILD_HOOK= \ +- PERL5LIB="$(srcdir):$(top_srcdir)/src/lib:$$PERL5LIB" \ +- PATH=$(abs_top_srcdir)/src/script:$(abs_top_srcdir)/src/c:$$PATH \ +- perl -w ++AM_TESTS_ENVIRONMENT = \ ++ BZR_HOME="$(abs_builddir)/data"; export BZR_HOME; \ ++ HYDRA_DBI="dbi:SQLite:db.sqlite"; export HYDRA_DBI; \ ++ HYDRA_DATA="$(abs_builddir)/data"; export HYDRA_DATA; \ ++ HYDRA_HOME="$(top_srcdir)/src"; export HYDRA_HOME; \ ++ HYDRA_CONFIG=; export HYDRA_CONFIG; \ ++ NIX_REMOTE=; export NIX_REMOTE; \ ++ NIX_CONF_DIR="$(abs_builddir)/nix/etc/nix"; export NIX_CONF_DIR; \ ++ NIX_STATE_DIR="$(abs_builddir)/nix/var/nix"; export NIX_STATE_DIR; \ ++ NIX_MANIFESTS_DIR="$(abs_builddir)/nix/var/nix/manifests"; export NIX_MANIFESTS_DIR; \ ++ NIX_STORE_DIR="$(abs_builddir)/nix/store"; export NIX_STORE_DIR; \ ++ NIX_LOG_DIR="$(abs_builddir)/nix/var/log/nix"; export NIX_LOG_DIR; \ ++ NIX_BUILD_HOOK=; export NIX_BUILD_HOOK; \ ++ PERL5LIB="$(srcdir):$(top_srcdir)/src/lib:$$PERL5LIB"; export PERL5LIB; \ ++ PATH=$(abs_top_srcdir)/src/script:$(abs_top_srcdir)/src/c:$$PATH; export PATH; ++LOG_COMPILER = $(PERL) ++AM_LOG_FLAGS = -w + + EXTRA_DIST = \ + $(wildcard *.pm) \ +@@ -33,7 +34,7 @@ + check_SCRIPTS = db.sqlite repos + + db.sqlite: $(top_srcdir)/src/sql/hydra-sqlite.sql +- $(TESTS_ENVIRONMENT) $(top_srcdir)/src/script/hydra-init ++ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) $(top_srcdir)/src/script/hydra-init + + repos: dirs + diff --git a/gnu/packages/patches/hydra-disable-darcs-test.patch b/gnu/packages/patches/hydra-disable-darcs-test.patch new file mode 100644 index 0000000000..5d8e015b08 --- /dev/null +++ b/gnu/packages/patches/hydra-disable-darcs-test.patch @@ -0,0 +1,25 @@ +--- hydra-20150407.4c0e3e4/tests/evaluation-tests.pl 2015-04-15 12:00:19.000000000 -0500 ++++ hydra-20150407.4c0e3e4/tests/evaluation-tests.pl 2015-04-17 08:53:04.940301471 -0500 +@@ -7,7 +7,7 @@ + + my $db = Hydra::Model::DB->new; + +-use Test::Simple tests => 72; ++use Test::Simple tests => 68; + + hydra_setup($db); + +@@ -103,13 +103,6 @@ + uri => "$jobsBaseUri/hg-repo", + update => getcwd . "/jobs/hg-update.sh" + }, +- { +- name => "darcs", +- nixexpr => "darcs-input.nix", +- type => "darcs", +- uri => "$jobsBaseUri/darcs-repo", +- update => getcwd . "/jobs/darcs-update.sh" +- } + ); + + foreach my $scm ( @scminputs ) { |