> Could it be that /bin/sh is a symlink whose target is not in the
> chroot?

Yes.  I used Guix to build a statically linked version of Bash:

guix# ./pre-inst-env guile
scheme@(guile-user)> (use-modules (guix packages)
                                                                  (guix store)
                                                                  (guix 
build-system gnu)
                                                                  (guix 
derivations)
                                                                  (gnu packages 
bash))
scheme@(guile-user)> (define store (open-connection))
accepted connection from pid 15744, uid 0
scheme@(guile-user)> (define static-bash (static-package bash-light))
scheme@(guile-user)> (define drv (package-derivation store static-bash))
scheme@(guile-user)> (derivation-path->output-paths drv)
$1 = (("out" . "/nix/store/d19fwrxihddfycxjc4qyb6a8cqgqfll7-bash-light-4.2"))
scheme@(guile-user)> (build-derivations store (list drv))
$2 = #t
# file /nix/store/d19fwrxihddfycxjc4qyb6a8cqgqfll7-bash-light-4.2/bin/bash
/nix/store/d19fwrxihddfycxjc4qyb6a8cqgqfll7-bash-light-4.2/bin/bash: ELF 32-bit 
LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 
2.6.30, stripped
# cp /nix/store/d19fwrxihddfycxjc4qyb6a8cqgqfll7-bash-light-4.2/bin/bash /bin/sh

Then 'nix-env -p ~/ghc-6.12.1 -iA nixpkgs.haskellPackages_ghc6121.ghc'
succeeded.

I've also tried 'nix-env -p ~/ghc-6.10.4 -i cabal-install-1.16.0.2', but
'binary' still fails with the same error:

Warning: binary.cabal: This package requires Cabal version: >=1.8

What package should I install?

Attachment: pgpb4tnFyH06a.pgp
Description: PGP signature

_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to