[Nix-dev] Re: RPM now includes NIX executables

Jeff Johnson n3npq at mac.com
Mon Mar 29 15:20:02 CEST 2010


On Mar 29, 2010, at 4:58 AM, Ludovic Courtès wrote:

> 
>> As part of studying Nix, I've now merged all the nix
>> executables into @rpm5.org CVS.
> 
> How do you plan to use them?
> 

The executables will be used to explicitly demonstrate "interoperability".
If RPM <-> Nix executables can be used interchangeably, then there
is de facto "interoperability". Q.E.D.

Short term the Nix executables will be used to
   1) create a single nix(1) executable (and toy standalone shell). All I'm saying
    is that these three syntaxes will do the same operation:
	$ nix-build -A libpopt		# the existing tool ...
        $ nix build -A libpopt		# ... now becomes nix(1) ...
	nix> build -A libpopt		# ... which has an interactive mode.
   2) refactoring to a library API which can be embedded in RPM. What that
    means for RPM is a PHP-like syntax within macro expansion, adding
    Yet Another Syntax to perform building POPT:
	$ rpm -E '%{nix build -A libpopt}'
    Note that a CLI macro expansion isn't RPM's primary usage case; macro expansions
    are extremely lightweight and can be done anywhere necessary, with dependency
    assertion checking, within package scriptlets, as part of RPM's
    state machines, anywhere a NIx side effect might be desired.

But personally, I'm using the nix executables to imprint Nix code
on my retinas while looking for more interesting "interoperability"
between RPM <-> NIX.

I can see several potential usage cases (but its way too early to say anything definite)
including:

    1) patchelf used to rewrite rpath's while installing *.rpm into /nix/store

    2) a "rpmenv" syntax (i.e. "stdenv" but producing *.rpm not Nix instances)
    to share (more or less) a common approach to build recipes between RPM <-> NIX.

Caveat: The above is just idle speculation. I reserve the right to speculate differently.

> Do you plan, e.g., to have code written in the Nix language as part of
> the RPM spec files, or to deploy packages to something similar to the
> Nix store?
> 

Both and more. But atm, I'm doing "wild hacking" to try to define what
might be meaningfully and usefully combined with RPM <-> Nix. The final
answer might very well end up being
	Nothing.
but I'm a bit more optimistic than that.

73 de Jeff


More information about the nix-dev mailing list