[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: customizing coverage
From: |
Ludovic Courtès |
Subject: |
Re: customizing coverage |
Date: |
Fri, 20 Jan 2012 22:17:51 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) |
Hi!
Thien-Thi Nguyen <address@hidden> skribis:
> This raises two followup questions:
>
> - Can i use the following in rcs/release.nix?
> (I.e., will it interfere badly w/ hydra machinery?)
>
> rcs/release.nix | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/rcs/release.nix b/rcs/release.nix
> index c8d2237..b63e318 100644
> --- a/rcs/release.nix
> +++ b/rcs/release.nix
> @@ -70,7 +70,7 @@ in
>
> coverage = pkgs: {
> buildInputs = [pkgs.ed];
> - inherit configureFlags;
> + configureFlags = meta.configureFlags + " --enable-coverage";
> };
>
> };
Under the hood, the coverage stuff uses the ‘coverageAnalysis’ function
(see ../gnu-jobs.nix), which essentially passes ‘--coverage’ in CFLAGS.
Its definition can be seen here:
https://nixos.org/repos/nix/nixpkgs/trunk/pkgs/build-support/release/nix-build.nix
So presumably, what you show above shouldn’t interfere badly, and in
fact shouldn’t make any difference.
> - If so, is that syntax correct? Is there a better way to append?
There are 1 problem: ‘meta.configureFlags’ means “get the attribute
named ‘configureFlags’ from the attribute set stored in the
lexically-scoped variable ‘meta’.” And ‘meta’ has no such field. So
instead, it should be:
configureFlags = configureFlags + " --enable-coverage";
Note that ‘+’ is like ‘string-append’.
Thanks,
Ludo’.