[Nix-dev] How do I ...
Marc Weber
marco-oweber at gmx.de
Tue Sep 23 11:09:03 CEST 2008
On Tue, Sep 23, 2008 at 10:03:39AM +0200, Pjotr Prins wrote:
> Hi Everyone,
>
> Thanks for the replies - it is heartening as I was getting a bit
> desperate I would get any help through the mailing list. I am not much
> of an IRC lover, but maybe I should change that.
>
> There were too many variables and the manual gave the wrong
> information. It suggests you can use the command line. What I tried
> was having a config.nix in my packages dir - thinking that nix-env -f
> . would pick that up. It does *something* because if I put in a syntax
> error Nix will balk. Another problem may be that the package does not
> get rebuilt - after changing the parameter. I don't know, but I'll try
> ./.nix-pkgs/config.nix first, next force the package to get rebuilt
> (how does one do that?), and if that fails upgrade Nix to a later
> version.
That's a task nix will figure out itself, why?
The configuration parameters will be build inputs.
The hash is calculated out of the build inputs which are passed as env
vars to the builder. If nix doesn't findan already realized path in
/nix/store with the given hash it falls back to building it by default.
So just chaning the config options is enough.
There are some rare cases nix didn't figure it out for me.
Eg when using
src = ./local.tar.gz and changing that local.tar.gz.
In these cases I added a dummy=0; to the derivation. Each time I wanted
to force a rebuild I've incremented it. But this should not be necessary
in your case.
Marc
More information about the nix-dev
mailing list