[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#42173: Nix on Guix System: can't update channels

From: Oleg Pykhalov
Subject: bug#42173: Nix on Guix System: can't update channels
Date: Tue, 21 Jul 2020 10:39:57 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)


Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
> (+Cc: Oleg, who worked on the Nix service.)
> Zhu Zihao via web <issues.guix.gnu.org@elephly.net> skribis:
>> I found that if I put "sandbox = false" to /etc/nix/nix.conf. Nix can update 
>> channel. Maybe nix's sandbox forget to import some guix binary path?
> Yes, probably.  There’s probably an option similar to the
> ‘--chroot-directory’ of ‘guix-daemon’ to specify additional directories
> that must be in the “sandbox”.
> If you find that option, then we can arrange and add all the
> dependencies of /gnu/store/…/bin/bash there (similar to what
> ‘qemu-binfmt-service-type’ does).

/gnu/store/…/bin/bash (we need a static-bash) is not enough, we also
should handle all packages (and closures in case binaries are not
static) listed in:

$(guix build --no-grafts nix)/share/nix/corepkgs/config.nix
--8<---------------cut here---------------start------------->8---
  fromEnv = var: def:
    let val = builtins.getEnv var; in
    if val != "" then val else def;
in rec {
  shell = 
  coreutils = "/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/bin";
  bzip2 = "/gnu/store/a9f7wmc75hbpg520phw9z4l9asm3qvsw-bzip2-1.0.8/bin/bzip2";
  gzip = "/gnu/store/ncydgq2znms5n1d2k5yqshhf58nsixwv-gzip-1.10/bin/gzip";
  xz = "/gnu/store/r7k859hmcnkazf492fasqvk25jflnfk6-xz-5.2.4/bin/xz";
  tar = "/gnu/store/v6f44zccwh9z5zk3pjlywjybbi8n2hjh-tar-1.32/bin/tar";
  tarFlags = "--warning=no-timestamp";
  tr = "/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32/bin/tr";
  nixBinDir = fromEnv "NIX_BIN_DIR" 
  nixPrefix = "/gnu/store/2x4qyarbmhi3dqcqhkkia6l491yjnf11-nix-2.3.6";
  nixLibexecDir = fromEnv "NIX_LIBEXEC_DIR" 
  nixLocalstateDir = "/nix/var";
  nixSysconfDir = "/etc";
  nixStoreDir = fromEnv "NIX_STORE_DIR" "/nix/store";

  # If Nix is installed in the Nix store, then automatically add it as
  # a dependency to the core packages. This ensures that they work
  # properly in a chroot.
  chrootDeps =
    if dirOf nixPrefix == builtins.storeDir then
      [ (builtins.storePath nixPrefix) ]
      [ ];
--8<---------------cut here---------------end--------------->8---

Currently I don't see a way to mount
dependencies (and other packages) inside the Nix sandbox.


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]