hydra: fix build job

This commit is contained in:
Rob Vermaas 2010-09-30 14:29:19 +00:00
parent c37b90ee3e
commit 3d3a495d27

View file

@ -5,7 +5,7 @@
rec {
tarball2 =
tarball =
let pkgs = import nixpkgs {};
in with pkgs;
@ -17,54 +17,6 @@ rec {
buildInputs = [ perl libxslt dblatex tetex ] ;
};
tarball =
with import nixpkgs {};
releaseTools.makeSourceTarball {
name = "hydra-tarball";
version = "0.1";
src = hydraSrc;
inherit officialRelease;
buildInputs = [zip unzip];
jquery = fetchurl {
url = http://jqueryui.com/download/jquery-ui-1.8.4.custom.zip;
sha256 = "05ma2xm9dksq7x97lqs8lnkrrcy52h11p1dmnl8cwpfm45p0z7cp";
};
tablesorter = fetchurl {
url = http://tablesorter.com/jquery.tablesorter.zip;
sha256 = "013zgglvifvy0yg0ybjrl823sswy9v1ihf5nmighmcyigfd6nrhb";
};
flot = fetchurl {
url = http://flot.googlecode.com/files/flot-0.6.zip;
sha256 = "1k2mfijvr1jwga65wcd78lp9ia17v99f1cfm5nlmc0k8glllbj5a";
};
# Since we don't have a `make dist', just tar everything.
distPhase = ''
ensureDir src/root/static/js/jquery
unzip -d src/root/static/js/jquery $jquery
rm -rf src/root/static/js/tablesorter
unzip -d src/root/static/js $tablesorter
unzip -d src/root/static/js $flot
make -C src/sql
releaseName=hydra-0.1$VERSION_SUFFIX
ensureDir $out/tarballs
mkdir ../$releaseName
cp -prd . ../$releaseName
cd ..
tar cfj $out/tarballs/$releaseName.tar.bz2 $releaseName
tar cfz $out/tarballs/$releaseName.tar.gz $releaseName
zip -9r $out/tarballs/$releaseName.zip $releaseName
'';
};
build =
{ system ? "x86_64-linux" }:
@ -74,38 +26,28 @@ rec {
let nix = nixSqlite; in
stdenv.mkDerivation {
releaseTools.nixBuild {
name = "hydra-${tarball.version}";
src = tarball;
configureFlags = "--with-nix=${nix}";
buildInputs =
[ perl makeWrapper libtool dblatex ]
[ perl makeWrapper libtool dblatex nix unzip ]
++ (import ./deps.nix) { inherit pkgs; };
preUnpack = ''
src=$(ls ${tarball}/tarballs/*.tar.bz2)
'';
hydraPath = stdenv.lib.concatStringsSep ":" (map (p: "${p}/bin") ( [
libxslt sqlite subversion openssh nix coreutils findutils
gzip bzip2 lzma gnutar unzip git mercurial
gnused graphviz
] ++ ( if stdenv.isLinux then [rpm dpkg cdrkit] else [] )));
installPhase = ''
postInstall = ''
ensureDir $out/nix-support
ensureDir $out/libexec
cp -prd src $out/libexec/hydra
mv $out/libexec/hydra/script $out/bin
cp ${"${nixpkgs}/pkgs/build-support/fetchsvn/nix-prefetch-svn"} $out/bin/nix-prefetch-svn
cp ${"${nixpkgs}/pkgs/build-support/fetchgit/nix-prefetch-git"} $out/bin/nix-prefetch-git
cp ${"${nixpkgs}/pkgs/build-support/fetchhg/nix-prefetch-hg"} $out/bin/nix-prefetch-hg
make -C src/c NIX=${nix} ATERM=${aterm}
cp src/c/hydra_eval_jobs $out/bin
for i in $out/bin/*; do
wrapProgram $i \
--prefix PERL5LIB ':' $out/libexec/hydra/lib:$PERL5LIB \
@ -115,14 +57,8 @@ rec {
--set NIX_RELEASE ${nix.name}
done
ensureDir $out/share/doc/hydra/manual
cp doc/manual/* $out/share/doc/hydra/manual/
make -C doc/manual manual.pdf
echo "doc-pdf manual $out/share/doc/hydra/manual/manual.pdf" >> $out/nix-support/hydra-build-products
echo "nix-build none $out" >> $out/nix-support/hydra-build-products
ensureDir $out/share/hydra/sql
cp src/sql/*.sql $out/share/hydra/sql/
''; # */
meta = {