[Nix-dev] nix channels and nix expressions

Tony White tonywhite100 at googlemail.com
Fri Sep 25 21:26:07 CEST 2009


2009/9/25 Marco Maggesi <maggesi at math.unifi.it>:
>
> On Sep 22, 2009, at 8:14 PM, Tony White wrote:
>
>> Hi Marco,
>> Yes, I think I understand what you are trying to do and nice work by
>> the way, you've obviously got the gist of creating expressions.
>> As far as standards go, the nix expression language is lazy by design,
>> so I don't think that there are too many standards to follow. I think
>> it's more like guidelines and if there is something very wrong or
>> there is a better way to do it I'm sure someone would just ask you and
>> suggest a better way to write the expression : If you wanted to commit
>> the packages to nixpkgs.
>> From the few expressions of yours I looked at, they seem fine but it's
>> not for me to judge. :)
>> If you want to commit your expressions to nixpkgs then I guess you
>> just use svn to commit them but I've never done it and you would have
>> to ask (I think Eelco.)
>> I don't know if you can just commit against your email address or if
>> Eelco sets up an svn account first?
>>
>> As far as modifying all-packages.nix goes without committing your
>> changes to the nixpkgs, just do it and then when you pull the latest
>> npkgs updates, if there is a conflict, svn will ask you : Yours or
>> theirs? So you'll get the option to drop or import the changes.
>> If your expressions do not exist in nixpkgs, then there generally
>> won't be anything you need to change when you pull a nixpkgs update.
>> I think that when you use svn on nixpkgs, the expressions you have
>> locally on your hard drive are patched against changes that the nix
>> developers have made and not completely overwritten. So you should be
>> safe to make modifications without the need to worry about constantly
>> recreating your expressions every time you pull nixpkgs.
>>
>> I think using your own equivalent of all-packages.nix which is used
>> along with all-packages.nix must be possible but I've never done it. I
>> think it's way simpler just to use all-packages.nix.
>> Maybe someone else knows how to do what you want to do or how to
>> commit using svn?
>>
>> Thanks,
>> Tony
>
> Hi Tony,
>
> I tend to think myself as a nix user and I hardly could find the time to
> get involved in the nix project on a regular basis that would justify to
> open a new subversion account for me.
>
> Of course, some of my expressions might be useful to others and I would
> be proud to submit part of my work for inclusion in nixpkgs as soon as I
> feel confident on its stability.
>
> Also, I think that nix should be used not only for nixpkgs and nixos,
> but also for for local or private tasks.  In other words I think we
> should promote an use of nix similar to other scripting tools.  E.g.,
> you can have bash scripts that are at the core of a linux distribution,
> but people use bash scripts also to  automate their everyday jobs, often
> in a quick-and-dirty manner.  It would be absurd to create a central
> subversion repository for "all" bash scripts in the world.  In the same
> spirit I think that nix + nixpkgs should be used also as a basis for a
> modular pattern of usage.  For instance, I'm trying to maintain my
> configuration and dot files (.emacs, .bashrc, ...) with nix.  And in my
> experience this is just easy as developing inside nixpkgs.  Of course,
> nix is most useful in conjunction with the nixpkgs expressions and by
> take advantage of the build farm.
>
> If this philosophy is accepted, my original question is still open, i.e.,
> is it possible to obtain the nixpkgs sources of the latest successful build?
> I suppose that this would be the role of a "stable" version of nixpkgs.
> But for now the present stable version seems simply outdated to be actually
> useful.
>
> Thanks,
> M.
>
>

Hi Marco,
If you are pulling nixpkgs from the stable branch, you probably want
to switch to the trunk branch if it's not all that current and if
trunk isn't fresh enough for you then the stdenv-updates branch might
be but I think that's more for developers to use as a staging ground.

https://svn.nixos.org/websvn/nix/nixpkgs/trunk/#_nixpkgs_trunk_

https://svn.nixos.org/websvn/nix/nixpkgs/branches/stdenv-updates/#_nixpkgs_branches_stdenv-updates_

http://hydra.nixos.org/build/79991/download/1/manual/#sec-channels

I think the manual needs updating (Wasn't unstable merged into trunk???)

Thanks,
Tony



More information about the nix-dev mailing list