[Nix-dev] some questions

Eelco Dolstra eelco at cs.uu.nl
Wed Apr 25 16:23:13 CEST 2007


Hi,

Sorry for another late reply, but I had to work on some other (urgent) stuff :-)

Erick Tryzelaar wrote:

> Good point. What about another profile-like system for this? This would
> let you have:
> 
> /nix/ns/nix/channels/nix-unstable     -> /nix/store/0hr...-channels/1
> /nix/ns/nix/channels/nixpkgs-unstable -> /nix/store/0hr...-channels/0
> /nix/nx/nix/nixpkgs/zlib/1.2.3 -> /nix/store/zld...-zlib-1.2.3
> /nix/nx/nix/drv/apr-util/1.2.7 -> /nix/store/zqz...-apr-util-1.2.7.drv
>
> This would let you easily browse the directory structure while still
> letting you share binaries between users.

Interesting idea.  On the other hand, "nix-env -q" also gives this information.
   The channels symlinks would be very useful, though (on a per-user basis).

>> Hm, that's a pretty good idea :-)  I haven't needed something like
>> that myself
>> because I just have a Subversion checkout, but that's not true for
>> users in
>> general, of course.  I'll make an issue about it.
> 
> I don't think this has made it yet into jira. Want me to add it for you?

Now it has: https://bugs.cs.uu.nl/browse/NIX-89

> What about one src package generating multiple binary target packages?
> In rpm, after A and B are generated from S, I believe they're
> independent of each other, as long as there aren't any specified
> dependencies. So we'd add A and B to nixpkgs, and then the act of adding
> and removing A or B shouldn't effect the other package. The only time
> you'd have a conflict is if you try to install S, but all it'd over
> write is the package B, not the install file.

Yes, it's certainly possible to have multiple packages that happen to build from
the same source.  The hard part would be to prevent work duplication between the
builders.  E.g., if you want a "bin" and a "lib" package, and you just do a
"make" in each builder followed by a "make install" of either the bin or lib
part, then you would end up with two source builds.

>>> 6. I read that I can either build a package, or install a prebuilt one.
>>> How can I select between the two?
>>
>> You can't - if you've nix-pulled, then Nix will download a pre-built
>> binary if
>> it's available.  If you really do want to build from source in that
>> case, you
>> can do "nix-store --clear-substitutes" to get rid of the nix-pull
>> registrations.
> 
> Does this permanently clear the cache?

Until you do the next nix-pull (or nix-channel --update, which calls nix-pull).

-- 
Eelco Dolstra | http://www.cs.uu.nl/~eelco



More information about the nix-dev mailing list