[Nix-dev] Re: *.tar.lzma archives
Ludovic Courtès
ludo at gnu.org
Sun Oct 18 16:03:53 CEST 2009
Hello,
"Sander van der Burg - EWI"
<S.vanderBurg at tudelft.nl> writes:
> You're right about gzip/bzip2, but we can add lzma/xz support the same
> way as unzip. The unzip command is also in the generic builder, but
> isn't a dependency of the stdenv (i.e. you have to put unzip in the
> buildInputs yourself and the genericBuilder provides the unpack
> command). I believe the command-line interfaces of lzma and xz are
> designed in such a way that they are almost similar to gzip/bzip2.
Actually, it’s even simpler than that. I noticed inadvertently that
using GNU tar, “tar xf something” will always do the right thing,
automatically extracting gzipped tar, bzip2’d tar, etc. (info "(tar)
gzip"). That means we can just change ‘stdenv’ to use ‘tar xf FILE’ as
the unpack command, and it will work for anything tar knows of.
Would you like to do that in ‘stdenv-updates’?
>> Besides, you're going to stumble upon a lot of similar issues if you
>> want to use the BSD tools instead of the GNU tools. Here and there
>> builders use GNU-specific options (e.g., "chmod -v" in
>> http://hydra.nixos.org/build/99093/nixlog/1/tail).
>
>> Thus, I would suggest using all of GNU Coreutils, GNU tar, GNU sed,
>> etc., on all supported platforms. IOW, only the libc and kernel
>> would be out of Nixpkgs' control.
>
> Yes, maybe we should implement the BSDs stdenv components in such a
> way that GNU variants for all the tools that are part of the stdenv
> are used.
Yes.
> However, if we really want to test BSD specific software we might want
> a BSD stdenv component as well.
That’s right. There’s a tension between getting Nixpkgs ported to BSDs
and getting “real” BSD platforms that can be used for portability
testing. The former is more easily achieved by using all the GNU tools
on BSD, whereas the latter is more useful if the platform uses BSD
tools. My feeling is that the latter is slightly out of scope.
Thanks,
Ludo’.
More information about the nix-dev
mailing list