Austin Seipp
76b05b1630
releaseTools: add {clang,coverity}Analysis tools
...
These two expressions greatly simplify using the clang-analyzer or
Coverity static analyzer on your C/C++ projects. In fact, they are
identical to nixBuild in every way out of the box, and should 'Just
Work' providing your code can be compiled with Clang already.
The trick is that when running 'make', we actually just alias it to the
appropriate scan build tool, and add a post-build hook that will bundle
up the results appropriately and unalias it.
For Clang, we put the results in $out/analysis and add an 'analysis'
report to $out/nix-support/hydra-build-products pointing to the result
HTML - this means that if the analyzer finds any bugs, the HTML results
will automatically show up Hydra for easy viewing.
For Coverity, it's slightly different. Instead we run the build tool and
after we're done, we tar up the results in a format that Coverity Scan's
service understands. We put the tarball in $out/tarballs under the name
'foo-cov-int.xz' and add an entry for the file to hydra-build-products
as well for easy viewing.
Of course for Coverity you must then upload the build. A Hydra plugin to
do this is on the way, and it will automatically pick up the
cov-int.tar.xz for uploading.
Note that coverityAnalysis requires allowUnfree = true;, as well as the
cov-build tools, which you can download from https://scan.coverity.com -
they're not linked to your account or anything, it's just an annoying
registration wall.
Note this is a first draft. In particular, scan-build fixes the C/C++
compiler to be Clang, and it's perfectly reasonable to want to use Clang
for the analyzer but have scan-build invoke GCC instead.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-02 14:07:37 -05:00
Eelco Dolstra
497997cc38
Move generation of coverage reports from nixos/lib/testing to releaseTools
...
Also, turn some stdenv adapters into setup hooks.
2014-03-03 13:57:08 +01:00
Eelco Dolstra
77376a215e
debBuild: Allow setting a maintainer address
2014-02-06 14:36:50 +01:00
Eelco Dolstra
6b613f285c
Fix nixBuild
2014-02-06 12:30:26 +01:00
Eelco Dolstra
80647127a3
Turn the coverage analysis stdenv adapters into setup hooks
...
Stdenv adapters are kinda weird and un-idiomatic (especially when they
don't actually change stdenv). It's more idiomatic to say
buildInputs = [ makeCoverageAnalysisReport ];
2014-02-05 19:18:33 +01:00
Rob Vermaas
13e13f279b
Do not assume a .rev attribute in available in src in maven-build.nix
2014-01-24 15:52:31 +01:00
Eelco Dolstra
16e626a80d
Replace lib/java -> share/java
2014-01-09 13:01:38 +01:00
Eelco Dolstra
4728ec3f99
Fix some references to apacheAntOpenJDK
2014-01-06 14:36:13 +01:00
Eelco Dolstra
0ff6f51703
Build aggregates locally
...
They're so trivial that we don't want to copy all those dependencies
to remote machines.
2013-08-21 14:50:34 +02:00
Eelco Dolstra
7151b3719f
Aggregates should not have a build product
2013-08-21 11:47:57 +02:00
Eelco Dolstra
68469ca342
releaseTools.aggregate: Rename ‘members’ to ‘constituents’
2013-08-15 02:29:08 +02:00
Eelco Dolstra
d46858d5b8
Propagate failure of aggregate members
2013-08-15 01:40:33 +02:00
Peter Simons
fd76a89bcb
pkgs/build-support/release/nix-build.nix: unconfuse syntax highlighting
2013-04-18 12:18:39 +02:00
Eelco Dolstra
b38647766d
releaseTools: Add ‘aggregate’ function
...
An aggregate is a trivial build that depends on other builds. This is
intended to provide a declarative replacement of Hydra's "view"
mechanism.
For instance, you can define an aggregate named "critical" that
depends on a selected set of jobs:
critical = releaseTools.aggregate
{ name = "foo-${tarball.version}";
members =
[ tarball
build.x86_64-linux
...
];
meta.description = "Release-critical builds";
};
The "critical" build will only succeed if all its members
(dependencies) succeed.
2013-03-26 11:58:59 +01:00
Eelco Dolstra
85d464a031
Remove some hackery
2013-03-06 16:57:57 +01:00
Eelco Dolstra
a1c5d6642b
build-support/release: Simplify meta.description
...
Phrases like "Build of a ..." are redundant because everything is a
build.
2013-03-01 12:50:29 +01:00
Eelco Dolstra
19ab71ff7a
releaseTools.nixBuild: Put hydra-build-products in each output
...
Putting a single hydra-build-products in $out can cause $out to have
unnecessary dependencies on other outputs.
2013-02-18 13:57:02 +01:00
Eelco Dolstra
a0a6f0edfd
releaseTools.nixBuild: Support builds with multiple outputs
2013-02-13 13:54:32 +01:00
Rob Vermaas
a049615e91
source-tarball.nix: try src.revCount when src.rev is not available.
2013-01-15 15:04:38 +01:00
Rob Vermaas
1d26619edf
use openjdk as default for ant-build.nix
2012-08-25 19:39:49 +02:00
Shea Levy
cff9e132e7
binary-tarball.nix: Forgot to source functions.sh
2012-08-09 07:12:20 -04:00
Petr Rockai
ce77a5ceec
Factor out repeated scriptlets from build-support/release/*.nix.
2012-07-23 20:33:04 +02:00
Petr Rockai
1eb5450bd4
Add --nodeps to rpm when test-uninstalling after a rpmBuild.
2012-07-23 20:31:51 +02:00
Petr Rockai
e1c172ab6b
Call rpm -U instead of rpm -i to test package installation.
2012-07-23 20:31:35 +02:00
Eelco Dolstra
c2fd3c184b
* Install/uninstall all RPMs in one operation. This is necessary if
...
the RPMs have dependencies between each other.
svn path=/nixpkgs/trunk/; revision=34303
2012-05-31 13:50:47 +00:00
Eelco Dolstra
ed2564f750
* Set the version number of generated Debian packages. Note that dpkg
...
apparently doesn't allows underscores in version strings, so we
replace them by dashes. This is the exact opposite of RPM, which
doesn't allow dashes.
svn path=/nixpkgs/trunk/; revision=34220
2012-05-24 15:07:38 +00:00
Eelco Dolstra
40609ab6d5
* Add a hook for running a test after the RPMs have been installed.
...
svn path=/nixpkgs/trunk/; revision=33966
2012-05-01 20:31:01 +00:00
Eelco Dolstra
8ecdd3a0aa
* Don't do a mkdir in the postHook.
...
svn path=/nixpkgs/trunk/; revision=33569
2012-04-04 16:05:08 +00:00
Eelco Dolstra
c3072a8df8
* When doing coverage builds, set useTempPrefix (in case we're doing
...
an "installcheck").
svn path=/nixpkgs/trunk/; revision=33261
2012-03-19 16:05:29 +00:00
Eelco Dolstra
9f683a5aac
* After building an RPM, install and uninstall it.
...
svn path=/nixpkgs/trunk/; revision=33257
2012-03-19 13:40:57 +00:00
Eelco Dolstra
ebd19ec705
* For "nix-build --run-env" it's desirable that $stdenv/setup (and by
...
extension postHook) does nothing else than set up the environment.
It shouldn't touch $out because there may not be a $out. So move
the "imperative" bits of postHook into a separate phase.
svn path=/nixpkgs/trunk/; revision=33249
2012-03-19 03:45:36 +00:00
Eelco Dolstra
06d28ca8f1
* Support setting postPhases.
...
svn path=/nixpkgs/trunk/; revision=33247
2012-03-19 02:45:52 +00:00
Yury G. Kudryashov
0210e20b5a
svn merge ^/nixpkgs/trunk
...
svn path=/nixpkgs/branches/stdenv-updates/; revision=32713
2012-03-01 07:04:39 +00:00
Ludovic Courtès
bd68cc6f5b
nix-build: Honor user-provided `failureHook'.
...
svn path=/nixpkgs/trunk/; revision=32680
2012-02-28 17:10:50 +00:00
Shea Levy
ea195b2507
svn merge ^/nixpkgs/trunk
...
svn path=/nixpkgs/branches/stdenv-updates/; revision=32564
2012-02-25 19:57:34 +00:00
Arie Middelkoop
70d56e0638
Fixed autoconfPhase so that it additionally tests if ./bootstrap is a file (and not a directory with executable permission) before executing it.
...
svn path=/nixpkgs/trunk/; revision=32530
2012-02-23 23:50:56 +00:00
Eelco Dolstra
c556a6ea46
* "ensureDir" -> "mkdir -p". "ensureDir" is a rather pointless
...
function, so obsolete it.
svn path=/nixpkgs/branches/stdenv-updates/; revision=31644
2012-01-18 20:16:00 +00:00
Eelco Dolstra
f3c3f11520
* Debian requires/provides should be comma-separated.
...
svn path=/nixpkgs/trunk/; revision=31259
2012-01-03 22:33:48 +00:00
Eelco Dolstra
032617b0ab
* Check whether any packages were generated. Apparently checkinstall
...
doesn't return a non-zero exit code if something goes wrong.
svn path=/nixpkgs/trunk/; revision=31258
2012-01-03 22:25:46 +00:00
Eelco Dolstra
b583b816cc
* Allow versionSuffix to be overriden.
...
svn path=/nixpkgs/trunk/; revision=30742
2011-12-05 14:16:30 +00:00
Rob Vermaas
0d62f0418c
nix-build.nix: also recognize xz tarballs
...
svn path=/nixpkgs/trunk/; revision=29760
2011-10-11 14:47:56 +00:00
Eelco Dolstra
a1f9b6f7b6
* Enable "make check" for checkinstall-based Debian builds. I always
...
assumed this was enabled...
svn path=/nixpkgs/trunk/; revision=29750
2011-10-11 09:13:31 +00:00
Eelco Dolstra
167c520570
* Added Debian 6.0 and Ubuntu 10.10.
...
svn path=/nixpkgs/trunk/; revision=25968
2011-02-14 16:52:32 +00:00
Rob Vermaas
2bd4d50f0d
nix-build.nix/source-tarball.nix: remove -v flag when copying build directory, to avoid polluting the log
...
svn path=/nixpkgs/trunk/; revision=25404
2011-01-05 09:06:53 +00:00
Rob Vermaas
f6426bad3b
also add succeedOnFailure/keepBuildDirectory behaviour to source-tarball.nix
...
svn path=/nixpkgs/trunk/; revision=25400
2011-01-05 07:31:29 +00:00
Rob Vermaas
6016038097
nixBuild: add failurehook that saves build dir when succeedOnFailure = true and keepBuildDirectory = true
...
svn path=/nixpkgs/trunk/; revision=25243
2010-12-22 14:57:18 +00:00
Rob Vermaas
cf8da224c6
fixing wrappers in ant-build
...
svn path=/nixpkgs/trunk/; revision=24637
2010-11-10 12:55:25 +00:00
Rob Vermaas
0df15241ca
fixes to ant-build
...
svn path=/nixpkgs/trunk/; revision=24383
2010-10-20 12:30:03 +00:00
Rob Vermaas
5a7fa1d061
antBuild: minor changes
...
svn path=/nixpkgs/trunk/; revision=24376
2010-10-20 08:23:52 +00:00
Rob Vermaas
b1332dca0f
svn path=/nixpkgs/trunk/; revision=24366
2010-10-19 13:43:29 +00:00
Ludovic Courtès
193799ec3d
nixBuild: Add `buildOutOfSourceTree' option.
...
svn path=/nixpkgs/trunk/; revision=23717
2010-09-10 12:39:57 +00:00
Rob Vermaas
03706558a9
maven-build: do full assembly without tests, add site to build products
...
svn path=/nixpkgs/trunk/; revision=23694
2010-09-09 10:47:54 +00:00
Rob Vermaas
62eb8741ce
maven-build: only copy site dir if it exists
...
svn path=/nixpkgs/trunk/; revision=23692
2010-09-09 07:22:45 +00:00
Rob Vermaas
b601947bcb
maven-build: copy whole site dir and adapted hydra-build-products
...
svn path=/nixpkgs/trunk/; revision=23691
2010-09-09 07:19:12 +00:00
Rob Vermaas
cf336d9c1d
maven-build: use single target in stead of assembly to prevent test from being run twice
...
svn path=/nixpkgs/trunk/; revision=23249
2010-08-19 13:36:57 +00:00
Rob Vermaas
12bfda97b8
maven-build: if surefire was run, generate html and add to result
...
svn path=/nixpkgs/trunk/; revision=23246
2010-08-19 12:24:14 +00:00
Rob Vermaas
e7dd6dcc6a
wrong location for surefire reports
...
svn path=/nixpkgs/trunk/; revision=23224
2010-08-18 11:48:35 +00:00
Rob Vermaas
9e2074f199
remove mvncobertura phase
...
svn path=/nixpkgs/trunk/; revision=23219
2010-08-18 09:55:34 +00:00
Rob Vermaas
7a4356b7e9
typo
...
svn path=/nixpkgs/trunk/; revision=22170
2010-06-07 14:24:57 +00:00
Rob Vermaas
94356324f5
antbuild: added 2 arguments, antbuildinputs (all jars are added to classpath) and buildfile (for different location of build.xml)
...
svn path=/nixpkgs/trunk/; revision=22169
2010-06-07 13:58:13 +00:00
Ludovic Courtès
9f50c154c3
Revert "releaseTools.sourceTarball: Make the bootstrap build inputs native."
...
This reverts commit 84b521c23b57108fc63731de7723885d68a92b08.
Reverting "releaseTools.sourceTarball: Fix regression introduced in r21955."
Reverting "releaseTools.sourceTarball: Make the bootstrap build inputs native."
svn path=/nixpkgs/trunk/; revision=21962
2010-05-25 08:24:50 +00:00
Ludovic Courtès
e436eb4915
releaseTools.sourceTarball: Fix regression introduced in r21955.
...
svn path=/nixpkgs/trunk/; revision=21959
2010-05-24 23:03:00 +00:00
Ludovic Courtès
0146e9b7ab
releaseTools.sourceTarball: Make the bootstrap build inputs native.
...
svn path=/nixpkgs/trunk/; revision=21955
2010-05-24 21:28:36 +00:00
Ludovic Courtès
7a491b54fa
releaseTools.coverageAnalysis: Add `lcovExtraTraceFiles' parameter.
...
svn path=/nixpkgs/trunk/; revision=21743
2010-05-12 12:22:44 +00:00
Rob Vermaas
fbc33c5485
maven-build.nix: added extraMvnFlags argurment
...
svn path=/nixpkgs/trunk/; revision=21181
2010-04-20 14:32:07 +00:00
Rob Vermaas
8929e647c6
generatewrapper fix
...
svn path=/nixpkgs/trunk/; revision=20796
2010-03-23 20:54:59 +00:00
Rob Vermaas
addc98c02f
initial version for maven builder
...
svn path=/nixpkgs/trunk/; revision=20558
2010-03-11 14:44:17 +00:00
Rob Vermaas
e55f37246a
use hydrantlogger if in environment
...
svn path=/nixpkgs/trunk/; revision=20399
2010-03-05 10:35:11 +00:00
Rob Vermaas
edb6a80ac3
ant builder
...
svn path=/nixpkgs/trunk/; revision=20395
2010-03-05 10:09:22 +00:00
Rob Vermaas
41698cf72c
obviously just c/p'ing without testing should result in taking away commit rights...
...
svn path=/nixpkgs/trunk/; revision=19208
2010-01-04 13:37:49 +00:00
Rob Vermaas
db6f4ee89c
* nix-build.nix: omit phases and define postPhases, suggested by eelco
...
svn path=/nixpkgs/trunk/; revision=19203
2010-01-04 12:44:34 +00:00
Rob Vermaas
67d7f430e2
* removed wrong order of phases from nixbuild, for now make check after install for strategoxt packages
...
svn path=/nixpkgs/trunk/; revision=19202
2010-01-04 12:07:05 +00:00
Ludovic Courtès
064aae6461
releaseTools.sourceTarball: Allow overriding of the bootstrap build inputs.
...
svn path=/nixpkgs/trunk/; revision=18804
2009-12-04 14:56:37 +00:00
Rob Vermaas
d55c6d8404
revert change from ludo rev. 18634. for now this order is needed for the stratego packages in the buildfarm, and the order should matter as normally nothing gets built in check phase that is needed for install phase
...
svn path=/nixpkgs/trunk/; revision=18637
2009-11-26 06:52:13 +00:00
Ludovic Courtès
f5236b1e0d
releaseTools.nixBuild: Perform checkPhase' before
installPhase'.
...
svn path=/nixpkgs/trunk/; revision=18634
2009-11-25 23:15:18 +00:00
Rob Vermaas
5fca80982a
move autoconfPhase so it can be overriden
...
svn path=/nixpkgs/trunk/; revision=18458
2009-11-19 13:57:57 +00:00
Ludovic Courtès
15da008651
Slightly generalize `sourceTarball'.
...
svn path=/nixpkgs/trunk/; revision=18426
2009-11-18 14:12:39 +00:00
Eelco Dolstra
f7282b61c3
* Allow additional Deb provides/requires to be specified.
...
svn path=/nixpkgs/trunk/; revision=18139
2009-11-05 14:40:25 +00:00
Eelco Dolstra
b578e0d353
* Work around an apparent bug in the Nix expression lexer (it doesn't
...
accept $' in ''-strings).
svn path=/nixpkgs/trunk/; revision=17942
2009-10-23 13:41:11 +00:00
Eelco Dolstra
f8bd8467ae
* Give SRPMs a different build product type.
...
svn path=/nixpkgs/trunk/; revision=17912
2009-10-21 13:34:17 +00:00
Rob Vermaas
6b7b8ae98a
give extraRPMs/-Debs file type rpm-extra or deb-extra in build products
...
svn path=/nixpkgs/trunk/; revision=17592
2009-10-02 09:49:53 +00:00
Rob Vermaas
3cfbaaba4b
add extrarpms to build-products of rpm build
...
svn path=/nixpkgs/trunk/; revision=17581
2009-10-01 19:25:08 +00:00
Rob Vermaas
cbf13d8269
svn path=/nixpkgs/trunk/; revision=17571
2009-10-01 12:12:45 +00:00
Rob Vermaas
4d5141bd2c
extra deb/rpm changes
...
svn path=/nixpkgs/trunk/; revision=17560
2009-10-01 07:25:50 +00:00
Eelco Dolstra
46c576ad25
* Enable FS translation to be enabled.
...
svn path=/nixpkgs/trunk/; revision=17375
2009-09-23 20:10:39 +00:00
Eelco Dolstra
086dd25510
* Use --coverage, which is identical to -fprofile-arcs -ftest-coverage.
...
svn path=/nixpkgs/trunk/; revision=16903
2009-08-31 15:02:27 +00:00
Rob Vermaas
0806854b24
changed mem size for rpm/deb build vms, added version specific packages for fedora9++
...
svn path=/nixpkgs/trunk/; revision=16136
2009-07-02 12:53:25 +00:00
Rob Vermaas
cd2c0b26ad
moved finalPhase so it is possible to override through args
...
svn path=/nixpkgs/trunk/; revision=15977
2009-06-17 07:02:59 +00:00
Rob Vermaas
8c3809729c
* --fstrans=no for building debian packages
...
svn path=/nixpkgs/trunk/; revision=15859
2009-06-05 10:42:14 +00:00
Rob Vermaas
1fe82f7ff9
* added pre-/postInstall hook to debbuild
...
svn path=/nixpkgs/trunk/; revision=15843
2009-06-03 18:33:04 +00:00
Rob Vermaas
b217e83691
* renamed installCommand -> installPhase for debian build
...
svn path=/nixpkgs/trunk/; revision=15816
2009-06-02 08:11:40 +00:00
Eelco Dolstra
fd473913f5
* Removed some obsolete nullglobs.
...
svn path=/nixpkgs/branches/stdenv-updates/; revision=15140
2009-04-19 08:55:27 +00:00
Eelco Dolstra
d27514cb28
* Sync with the trunk once more.
...
* Turn on everything in Hydra.
svn path=/nixpkgs/branches/stdenv-updates/; revision=14806
2009-03-31 15:30:47 +00:00
Eelco Dolstra
7505920605
* Bump the default Hydra priority of tarball builds.
...
svn path=/nixpkgs/trunk/; revision=14777
2009-03-30 13:21:00 +00:00
Eelco Dolstra
5d27947703
* Don't try to auto-include documentation in Debian packages.
...
svn path=/nixpkgs/trunk/; revision=14737
2009-03-27 14:13:49 +00:00
Eelco Dolstra
5a8a90cd56
* Test whether we can successfully install and uninstall the Debian
...
package we just built.
svn path=/nixpkgs/trunk/; revision=14730
2009-03-26 15:45:37 +00:00
Eelco Dolstra
f30fe65b3e
* makeSourceTarball -> sourceTarball.
...
* Added a function binaryTarball to do a DESTDIR build into
/usr/local. Useful for making statically linked binaries. However,
it may be better to do this in a VM (since if you do it in a Nix
build environment, you can still end up with a lot of Nix
dependencies in your binaries, even if you do static linking).
svn path=/nixpkgs/trunk/; revision=14726
2009-03-26 14:11:59 +00:00
Eelco Dolstra
d8e436c742
* Sync with the trunk.
...
svn path=/nixpkgs/branches/stdenv-updates/; revision=14634
2009-03-20 16:49:02 +00:00
Eelco Dolstra
b460175a7e
* Backwards compatibility hack for Stratego/XT packages.
...
svn path=/nixpkgs/trunk/; revision=14608
2009-03-19 13:59:31 +00:00
Eelco Dolstra
468ffe8466
* Turn on nullglob globally so that distPhase works when we copy
...
"*.tar.bz2 *.tar.gz" and there are no *.tar.gz files. Maybe we
should turn this on in stdenv (nullglob just seems like the right
thing to do in general).
svn path=/nixpkgs/trunk/; revision=14606
2009-03-19 13:39:07 +00:00