[Nix-dev] some questions

Erick Tryzelaar erickt at dslextreme.com
Tue Apr 3 00:11:25 CEST 2007


Hello!

Nix looks very interesting! I found my way here from 
http://lambda-the-ultimate.org/node/2163. I've got some questions.


1. I'm running a mac, and so there's a very small amount of packages 
that will install from nixpkgs, but I know a good amount of them will 
actually install. Is the only way to get things to compile is either 
modify the pkgs/top-level/build-for-release.nix, or pretend to be 
another build target. Is there an easier way to do this? It would be 
nice if the system compatibility could be embedded in the package, 
instead of build-for-release.nix file. I think it'd make things a little 
more maintainable. Could it be automatically generated from a package's 
metadata, assuming the supported platforms was added to the package?


2. Is there a reason why the files in the store are named 
guid-project-version, instead of project-version-guid? Or even better, 
type/namespace/project-version/guid, where type is 
user-environment/channel/downloads/etc and namespace is the java-like 
nix.cs.uu.nl? It's a little hard to navigate this way.


3. Along these lines, it's a little hard finding the channel files. 
They're currently something like:

/nix/store/0hr9wrwhiq18l3gils4s0vzhi9rkb795-channels/0
/nix/store/0hr9wrwhiq18l3gils4s0vzhi9rkb795-channels/1

Instead of 0 and 1, it would be nice if they could also follow a 
namespace/project-version/guid. So it'd be something like:

/nix/store/nix/channels-0hr9wrwhiq18l3gils4s0vzhi9rkb795/nix.cs.uu.nl/nixpkgs-unstable
/nix/store/nix/channels-0hr9wrwhiq18l3gils4s0vzhi9rkb795/nix.cs.uu.nl/nix-unstable


4. From what I can tell from the documentation, it's possible to compile 
code while enabling different features, such as one build of subversion 
supporting mod_dav_svn, and another not. But I can't figure out how I'm 
supposed to do this. macports, another packaging system for the mac, has 
something similar called variants, where you just do this:

port install +mod_dav_svn

Which adds a dependency on apache2, and appends 
"--with-apxs=${prefix}/apache2/bin/apxs --disable-mod-activation" to the 
configure. It works out well, but the downside is that one package can't 
depend on another package's variants. I believe nix can do this. Is 
there a simple interface for it?


5. rpm and apt have a nice feature where one .spec file can generate 
multiple packages. This lets you split up bundling development files and 
libraries. Can nix do this?


6. I read that I can either build a package, or install a prebuilt one. 
How can I select between the two?


7. The documentation is a little long for one page. Could it be broken 
up into a couple pages?


8. At work, we have a pretty elaborate build system for maintaining 
multiple active versions of a project. So, we'd have:

/global/foo/
  1 -> 1.1.0
  1.0 -> 1.0.1
  1.0.1/...
  1.1 -> 1.1.0
  1.1.0/...
/global/bar/
  2 -> 2.0.1
  2.0 -> 2.0.1
  2.0.1/...
  3 -> 3.0.0
  3.0 -> 3.0.0
  3.0.1/...
/local/foo -> 1
/local/bar -> 2

Where "bar-2.x.x" depends on "foo-1.0", and "bar-3.x.x" depends on 
"foo-1.1". We save the last number for binary-compatible bug fixes. The 
global/local version is like the nix profiles, where a local machine can 
be switched from one version to another of a netmount shared global 
version. It seems like it'd be pretty easy to use the profiles for this, 
but I'm not sure how I can set up a package to depend on, say, only the 
major version of a library, which allows for the package to be upgradeable.

If you're not familiar with http://www.gobolinux.org, they have 
something like this set up.



I think thats good for now :) Thanks!

-e



More information about the nix-dev mailing list