From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id SFWSIO5W514aFgAA0tVLHw (envelope-from ) for ; Mon, 15 Jun 2020 11:09:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QAt/HO5W517UOwAAB5/wlQ (envelope-from ) for ; Mon, 15 Jun 2020 11:09:34 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A12E0940990 for ; Mon, 15 Jun 2020 11:09:33 +0000 (UTC) Received: from localhost ([::1]:35420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkmza-0002Mi-UQ for larch@yhetil.org; Mon, 15 Jun 2020 07:09:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58924) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkmz8-0002Fm-B3 for guix-patches@gnu.org; Mon, 15 Jun 2020 07:09:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkmz8-0004MQ-20 for guix-patches@gnu.org; Mon, 15 Jun 2020 07:09:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jkmz7-0004t9-Tf for guix-patches@gnu.org; Mon, 15 Jun 2020 07:09:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41704] [PATCH V2] services: nix: Set NIX_CONF_DIR environment variable. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Jun 2020 11:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41704 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Peng Mei Yu Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 41704@debbugs.gnu.org Received: via spool by 41704-submit@debbugs.gnu.org id=B41704.159221933118775 (code B ref 41704); Mon, 15 Jun 2020 11:09:01 +0000 Received: (at 41704) by debbugs.gnu.org; 15 Jun 2020 11:08:51 +0000 Received: from localhost ([127.0.0.1]:45343 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkmyw-0004sk-O5 for submit@debbugs.gnu.org; Mon, 15 Jun 2020 07:08:51 -0400 Received: from tobias.gr ([80.241.217.52]:53986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkmyv-0004sb-Cw for 41704@debbugs.gnu.org; Mon, 15 Jun 2020 07:08:50 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id dde742e8; Mon, 15 Jun 2020 11:08:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to:cc :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=H3p5URVRcLEZDQklIqjfwi Jowh47hSq2oVYW3qToj7k=; b=d6ow1ROe5okQz/CYoFik8JzqklbC6e8CmV6JbR Vv4a0m8nTuwb0YoMPAB2qj7L3auBatTb3jVhMoUWUI2usTgcv45vgLSMbUBmM+xV LpnS3GL3G34V+fbmx7BAMcDqZYCso6SaY7Zt/7lMKqGg8vIpzXoJgJ45DvlagUmE wDEhchnCVX/cqHraPydqJgPNr/eG3hE7OnECl6q7wvmig5rwkocrTrzYi3dnm2iT vkaEhZpnKNDErEcXtHrls5is6bDzkbo8/koWr6F2v5uymYfiM9uPsD3juJGRwhob miWgyvpY1/ZDp9foS1Ky19nwIbyTaPP0FLBmQ36bHvQf0EAg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id cf5593b5 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 15 Jun 2020 11:08:57 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; References: <20200604070103.2548-1-pengmeiyu@riseup.net> <20200604090922.19352-1-pengmeiyu@riseup.net> <878sgwoevv.fsf@gnu.org> <87r1ui1337.fsf@pengmeiyu.com> In-reply-to: <87r1ui1337.fsf@pengmeiyu.com> Date: Mon, 15 Jun 2020 13:08:44 +0200 Message-ID: <87bllkoabn.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=tobias.gr header.s=2018 header.b=d6ow1ROe; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.61 X-TUID: 5wqI+JuvYAqP --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Peng Mei Yu, I agree with Ludo' that fixing this at the package level is more=20 =E2=80=98appropriate=E2=80=99 than in the service. Peng Mei Yu =E5=86=99=E9=81=93=EF=BC=9A > There is no obvious way to fix the error, so setting=20 > NIX_CONF_DIR is > easier. Perhaps someone can fix the nix package with a clean=20 > patch. > That would be better. Obvious is different things to different people, but here's my=20 go-to approach. Override the relevant variables during the=20 install phase without changing any run-time settings: #+begin_example diff --git a/gnu/packages/package-management.scm=20 b/gnu/packages/package-management.scm index c1e6657dff..fefa17a162 100644 =2D-- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -551,6 +551,19 @@ out) and returning a package that uses that=20 as its 'source'." (base32 "1hbqsrp1ii2sfq8x2mahjrl2182qck76n8blrl1jfz3xq99m6i15")))) (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list "--sysconfdir=3D/etc") + #:phases + (modify-phases %standard-phases + (replace 'install + (lambda* (#:key (make-flags '()) outputs=20 #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (etc (string-append out "/etc"))) + (apply invoke "make" "install" + (string-append "sysconfdir=3D" etc) + (string-append "profiledir=3D" etc=20 "/profile.d") + make-flags))))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs `(("boost" ,boost) ("brotli" ,brotli) #+end_example It installs correctly. I didn't test the service. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXudWvAAKCRANsP+IT1Vt eWu8AP0Wz60B9gdeHfMWjEczPiLX/6TqB8y8Ybr0sf8AAYjSrAD/VA88qv3S0UPE 3SU294xElJFwOXvOCVWIXYnmH/r/sQg= =C6R6 -----END PGP SIGNATURE----- --=-=-=--