* Support setting postPhases.

svn path=/nixpkgs/trunk/; revision=33247
This commit is contained in:
Eelco Dolstra 2012-03-19 02:45:52 +00:00
parent fbfa56c165
commit 06d28ca8f1

View file

@ -13,6 +13,7 @@
, src, stdenv
, name ? if doCoverageAnalysis then "nix-coverage" else "nix-build"
, failureHook ? null
, postPhases ? []
, ... } @ args:
stdenv.mkDerivation (
@ -26,9 +27,6 @@ stdenv.mkDerivation (
showBuildStats = true;
postPhases =
(stdenv.lib.optional doCoverageAnalysis "coverageReportPhase") ++ ["finalPhase"];
finalPhase =
''
# Propagate the release name of the source tarball. This is
@ -105,6 +103,9 @@ stdenv.mkDerivation (
inherit lcovExtraTraceFiles;
postPhases = postPhases ++
(stdenv.lib.optional doCoverageAnalysis "coverageReportPhase") ++ ["finalPhase"];
meta = (if args ? meta then args.meta else {}) // {
description = if doCoverageAnalysis then "Coverage analysis" else "Native Nix build on ${stdenv.system}";
};