* Build RPMs, Debs, coverage analysis.

This commit is contained in:
Eelco Dolstra 2008-12-04 15:25:28 +00:00
parent 909fbb9de1
commit 9850262a72
1 changed files with 156 additions and 52 deletions

View File

@ -1,4 +1,6 @@
let jobs = rec {
let
jobs = rec {
tarball =
@ -73,4 +75,106 @@ let jobs = rec {
};
}; in jobs
coverage =
{ tarball ? {path = jobs.tarball {};}
, nixpkgs ? {path = ../nixpkgs;}
}:
with import nixpkgs.path {};
releaseTools.coverageAnalysis {
name = "nix-build";
src = tarball;
buildInputs = [
curl perl bzip2 openssl
# These are for "make check" only:
graphviz libxml2 libxslt
];
configureFlags = ''
--disable-init-state --disable-shared
--with-bdb=${db45} --with-aterm=${aterm242fixes} --with-bzip2=${bzip2}
'';
lcovFilter = ["*/boost/*" "*-tab.*"];
# We call `dot', and even though we just use it to
# syntax-check generated dot files, it still requires some
# fonts. So provide those.
FONTCONFIG_FILE = texFunctions.fontsConf;
};
rpm_fedora9i386 = makeRPM (diskImages: diskImages.fedora9i386) 50;
rpm_fedora10i386 = makeRPM (diskImages: diskImages.fedora10i386) 40;
rpm_opensuse103i386 = makeRPM (diskImages: diskImages.opensuse103i386) 40;
deb_debian40i386 = makeDeb (diskImages: diskImages.debian40i386) 30;
deb_ubuntu804i386 = makeDeb (diskImages: diskImages.ubuntu804i386) 40;
};
doBuild =
{ tarball, nixpkgs, system, coverageAnalysis }:
with import nixpkgs.path {inherit system;};
releaseTools.nixBuild {
name = "nix-build";
src = tarball;
buildInputs = [curl perl bzip2 openssl];
configureFlags = ''
--disable-init-state
--with-bdb=${db45} --with-aterm=${aterm242fixes} --with-bzip2=${bzip2}
'';
postInstall = if coverageAnalysis then "" else ''
echo "doc manual $out/share/doc/nix/manual" >> $out/nix-support/hydra-build-products
echo "doc release-notes $out/share/doc/nix/release-notes" >> $out/nix-support/hydra-build-products
'';
inherit coverageAnalysis;
};
makeRPM =
diskImageFun: prio:
{ tarball ? {path = jobs.tarball {};}
, nixpkgs ? {path = ../nixpkgs;}
}:
with import nixpkgs.path {};
releaseTools.rpmBuild rec {
name = "nix-rpm-${diskImage.name}";
src = tarball;
diskImage = diskImageFun vmTools.diskImages;
memSize = 1024;
meta = { schedulingPriority = toString prio; };
};
makeDeb =
diskImageFun: prio:
{ tarball ? {path = jobs.tarball {};}
, nixpkgs ? {path = ../nixpkgs;}
}:
with import nixpkgs.path {};
releaseTools.debBuild {
name = "nix-deb";
src = tarball;
diskImage = diskImageFun vmTools.diskImages;
memSize = 1024;
meta = { schedulingPriority = toString prio; };
};
in jobs