[Nix-dev] nix-shell enhancements

Joachim Schiele js at lastlog.de
Sat Jul 27 11:45:30 CEST 2013


On 07/27/2013 01:23 AM, Marc Weber wrote:
> Well - I have one command
>
> nI -A foo
>
> which builds foo by attr with -K flag.
> If the build fails, it cds into the build directory.
> I then have a second command to start a new terminal window
> so that I can load nix-env.
>
> That's all I need for debugging.

seems to be a valid workflow though ;-)

> If I need more I add a "fail" to a build phase, and run the others
> manually.
> That's my way :)

if you want to try a patch (thus make nix deployment impure), using 
nix-shell might be a better way since you would not have to touch any 
nix stuff then.

> You talk about git and rollbacks. What about .o files? Will they be
> committed so that you can "rollback" ? You should clarify such details.

yes something like that. i'm still playing with what might be helpful. 
for now i think that the PS1 i've already sent to the list is a great 
enhancement.

but yes, my idea also included adding .o files to the store as well as 
shell variables ...

my main goal in the first place was to make 'creating patches' easier, 
so that you would not have to maintain two source checkouts and use a 
manual diff for that.

it would be totally cool to have a command like this:
   createPatch file.c src/file.h README > mypatch-1.2.3.patch

which would then transparently use 'unpackPhase' (and maybe also 
'patchPhase') into a 'clean' directory and then use the diff command to 
create a patch which would be compatible to nix.




More information about the nix-dev mailing list