GNU bug report logs - #41704
[PATCH] services: nix: Set NIX_CONF_DIR environment variable.

Previous Next

Package: guix-patches;

Reported by: Peng Mei Yu <pengmeiyu <at> riseup.net>

Date: Thu, 4 Jun 2020 08:36:01 UTC

Severity: normal

Tags: patch

Done: Peng Mei Yu <pengmeiyu <at> riseup.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Peng Mei Yu <pengmeiyu <at> riseup.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 41704 <at> debbugs.gnu.org
Subject: [bug#41704] [PATCH V2] services: nix: Set NIX_CONF_DIR environment variable.
Date: Sun, 14 Jun 2020 16:10:35 +0800
Hi,

Ludovic Courtès writes:

>> * gnu/services/nix.scm (nix-shepherd-service): Set NIX_CONF_DIR environment
>> variable to "/etc/nix".
>
> Does the (untested) patch below solve the problem for you?
>
> Perhaps it’s more appropriate than setting NIX_CONF_DIR.
>
> Thanks,
> Ludo’.
>
> diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm
> index b1c96f18e7..b3c21473ed 100644
> --- a/gnu/packages/package-management.scm
> +++ b/gnu/packages/package-management.scm
> @@ -551,6 +551,7 @@ out) and returning a package that uses that as its 'source'."
>                (base32
>                 "1hbqsrp1ii2sfq8x2mahjrl2182qck76n8blrl1jfz3xq99m6i15"))))
>      (build-system gnu-build-system)
> +    (arguments '(#:configure-flags '("--sysconfdir=/etc")))
>      (native-inputs `(("pkg-config" ,pkg-config)))
>      (inputs `(("boost" ,boost)
>                ("brotli" ,brotli)

No.  I should have mentioned earlier.  With this patch, the install
phase will fail.

#+begin_example
  MKDIR  /etc/profile.d/
  install: cannot change permissions of ‘/etc/profile.d/’: No such file or directory
  make: *** [scripts/local.mk:10: /etc/profile.d/] Error 1
  command "make" "install" failed with status 2
  builder for `/gnu/store/c2lw5faljg1zh5ng4nb0inslq4b0fh9c-nix-2.3.5.drv' failed with exit code 1
  build of /gnu/store/c2lw5faljg1zh5ng4nb0inslq4b0fh9c-nix-2.3.5.drv failed
  View build log at '/var/log/guix/drvs/c2/lw5faljg1zh5ng4nb0inslq4b0fh9c-nix-2.3.5.drv.bz2'.
  guix build: error: build of `/gnu/store/c2lw5faljg1zh5ng4nb0inslq4b0fh9c-nix-2.3.5.drv' failed
#+end_example

There is no obvious way to fix the error, so setting NIX_CONF_DIR is
easier.  Perhaps someone can fix the nix package with a clean patch.
That would be better.


--
Peng Mei Yu
https://www.pengmeiyu.com/




This bug report was last modified 4 years and 339 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.