* Conditionals and variables in Fix expressions. This allows, e.g.,
Descr(
[ Bind("pkgId", "subversion-0.21.0")
, Bind("httpsClient", Bool(True))
, Bind("httpServer", Bool(True))
, Bind("ssl", If(Var("httpsClient"), Fix("./openssl-0.9.7b.fix"), ""))
, Bind("httpd", If(Var("httpServer"), Fix("./httpd-2.0.45.fix"), ""))
...
])
which introduces domain feature variables httpsClient and httpServer
(i.e., whether Subversion is built with https client and webdav
server support); the values of the variables influences package
dependencies and the build scripts.
The next step is to allow that packages can express constraints on
each other. E.g., StrategoXT is dependent on an ATerm library with
the "gcc" variant enabled. In fact, this may cause several
Nix instantiations to be created from a single Fix descriptor. If
possible, Fix should try to find the least set of instantiations
that obeys the constraints.
descriptors generated out of Fix descriptors specified on the
command line. This allows us to say:
nix-switch $(fix -i ./test/fixdescriptors/system.fix)
build action for `system' packages (like system.fix) that have
dependencies on all packages we want to activate.
So the command sequence to switch to a new activation configuration
of the system would be:
$ fix -i .../fixdescriptors/system.fix
...
system.fix -> 89cf4713b37cc66989304abeb9ea189f
$ nix-switch 89cf4713b37cc66989304abeb9ea189f
* A nix-profile.sh script that can be included in .bashrc.
packages (i.e., the packages that should appear in the user's $PATH,
and so on). Based on this list, the script nix-populate creates a
hierarchy of symlinks to the relevant files in those packages (e.g.,
for pkg/bin and pkg/lib).
A nice property of nix-populate is that on each run it creates a
*new* tree, rather than updating the old one. It then atomically
switches over to the new tree. This allows atomic upgrades or
rollbacks on the set of activated packages.
* Command `nix ensure' which is like `nix getpkg' except that if the
has refers to a run action it will just ensure that the imports are
there.
* Command `nix closure' to print out the closure of the set of
descriptors under the import relation, starting at a set of roots.
This can be used for garbage collection (e.g., given a list of
`activated' packages, we can delete all packages not reachable from
those).
* Command `nix graph' to print out a Dot graph of the dependency
graph.
* `nix-addroot' adds a root for the (unimplemented) garbage collector.
action. Run actions are described by uniquely hashed descriptors,
just like build actions. Therefore run actions can have
dependencies, but these need not be the same as the build time
dependencies (e.g., at runtime we can link against a different
version of a dynamic library). Example:
nix run 31d6bf4c171282367065e0deecd7c579
will run the Pan 0.13.91 newsreader with gtkspell support.
descriptor templates under the import relation. I.e., we can now
say:
nix-instantiate outdir foo.nix
which will create descriptors for foo.nix and all imported packages
in outdir/.
files) are now referenced using their cryptographic hashes.
This ensures that if two package descriptors have the same contents,
then they describe the same package. This property is not as
trivial as it sounds: generally import relations cause this property
not to hold w.r.t. temporality. But since imports also use hashes
to reference other packages, equality follows by induction.