[Nix-dev] Re: Handle runtime dependencies

Ludovic Courtès ludo at gnu.org
Mon Mar 17 21:26:48 CET 2008


Salut Nicolas,  ;-)

I'm still having a hard time trying to understand what you propose.

"Nicolas Pierron"
<nicolas.b.pierron at gmail.com> writes:

> I have found a way to handle runtime dependencies which offer the
> opportunity to not recompile a program if its runtime dependencies
> have changed.

Can you give an example of what you call a "run-time dependency"?  Can
you illustrate it with a concrete package?

>From the discussion that followed, I've had the impression that you were
referring to packages that have undeclared dependencies, such as
dependencies on executables.  Is this correct?

Assuming this is correct, then this packages are "impure", and I'd
assume the Nixish way to solve it is to make wrappers for those parts of
the package that are impure.

In general, Nix doesn't permit "relocation".  For instance, an
executable is supposed to be always dynamically linked against the very
libraries that were used at build-time, and this cannot be changed at
run-time.  Likewise, shell scripts that refer to commands with
non-absolute paths should be wrapped with, e.g.,

  wrapProgram "script.sh" --prefix PATH : \
              /nix/store/xxx-some-dependency/bin
  
See, for instance, `gitk' in the Git package, or Mercurial, or
`dhclient-script' in `dhcp', etc.

Thanks,
Ludovic.




More information about the nix-dev mailing list