GNU bug report logs - #42489
[PATCH] services: nix: Provide nix commands.

Previous Next

Package: guix-patches;

Reported by: Peng Mei Yu <i <at> pengmeiyu.com>

Date: Thu, 23 Jul 2020 09:27:01 UTC

Severity: normal

Tags: patch

Done: Oleg Pykhalov <go.wigust <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42489 in the body.
You can then email your comments to 42489 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#42489; Package guix-patches. (Thu, 23 Jul 2020 09:27:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Peng Mei Yu <i <at> pengmeiyu.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 23 Jul 2020 09:27:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peng Mei Yu <i <at> pengmeiyu.com>
To: guix-patches <at> gnu.org
Cc: Peng Mei Yu <i <at> pengmeiyu.com>
Subject: [PATCH] services: nix: Provide nix commands.
Date: Thu, 23 Jul 2020 17:24:13 +0800
* gnu/services/nix.scm (nix-service-type): Extend profile-service-type to
provide nix commands.
---
 gnu/services/nix.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
index 75b2df02dc..e73203c2c5 100644
--- a/gnu/services/nix.scm
+++ b/gnu/services/nix.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2019, 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
+;;; Copyright © 2020 Peng Mei Yu <i <at> pengmeiyu.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -134,7 +135,9 @@ GID."
    (extensions
     (list (service-extension shepherd-root-service-type nix-shepherd-service)
           (service-extension account-service-type nix-accounts)
-          (service-extension activation-service-type nix-activation)))
+          (service-extension activation-service-type nix-activation)
+          (service-extension profile-service-type
+                             (compose list nix-configuration-package))))
    (description "Run the Nix daemon.")
    (default-value (nix-configuration))))
 
-- 
2.27.0





Information forwarded to guix-patches <at> gnu.org:
bug#42489; Package guix-patches. (Fri, 24 Jul 2020 06:13:01 GMT) Full text and rfc822 format available.

Message #8 received at 42489 <at> debbugs.gnu.org (full text, mbox):

From: pengmeiyu <at> riseup.net
To: 42489 <at> debbugs.gnu.org
Cc: Peng Mei Yu <i <at> pengmeiyu.com>
Subject: [PATCH] services: nix: Export nix-configuration.
Date: Fri, 24 Jul 2020 14:11:43 +0800
From: Peng Mei Yu <i <at> pengmeiyu.com>

* gnu/services/nix.scm (nix-configuration): Export it.
---
 gnu/services/nix.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
index e73203c2c5..5a0a965a69 100644
--- a/gnu/services/nix.scm
+++ b/gnu/services/nix.scm
@@ -35,7 +35,8 @@
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
   #:use-module (guix modules)
-  #:export (nix-service-type))
+  #:export (nix-configuration
+            nix-service-type))
 
 ;;; Commentary:
 ;;;
-- 
2.27.0





Information forwarded to guix-patches <at> gnu.org:
bug#42489; Package guix-patches. (Fri, 24 Jul 2020 15:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 42489 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Peng Mei Yu <i <at> pengmeiyu.com>
Cc: 42489 <at> debbugs.gnu.org
Subject: Re: [bug#42489] [PATCH] services: nix: Provide nix commands.
Date: Fri, 24 Jul 2020 18:06:00 +0300
[Message part 1 (text/plain, inline)]
Hi,

Peng Mei Yu <i <at> pengmeiyu.com> writes:

> * gnu/services/nix.scm (nix-service-type): Extend profile-service-type to
> provide nix commands.
> ---
>  gnu/services/nix.scm | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
> index 75b2df02dc..e73203c2c5 100644
> --- a/gnu/services/nix.scm
> +++ b/gnu/services/nix.scm
> @@ -1,5 +1,6 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2019, 2020 Oleg Pykhalov <go.wigust <at> gmail.com>
> +;;; Copyright © 2020 Peng Mei Yu <i <at> pengmeiyu.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -134,7 +135,9 @@ GID."
>     (extensions
>      (list (service-extension shepherd-root-service-type nix-shepherd-service)
>            (service-extension account-service-type nix-accounts)
> -          (service-extension activation-service-type nix-activation)))
> +          (service-extension activation-service-type nix-activation)
> +          (service-extension profile-service-type
> +                             (compose list nix-configuration-package))))
>     (description "Run the Nix daemon.")
>     (default-value (nix-configuration))))

I don't understand what you trying to archive. 


Do you want to run `/gnu/store/…nix…/bin/nix-daemon` with flags, like
‘--debug’?  It's better to add ‘extra-options’ to ‘<nix-configuration>’
record and use it in ‘nix-shepherd-service’.

Also, I found a typo in ‘<nix-configuration>’
‘nix-configuration-extra-options’ should be
‘nix-configuration-extra-config’.

Could you documentat the feature in ‘doc/guix.texi’, please?


> * gnu/services/nix.scm (nix-configuration): Export it.
                                                     ^^^
Just “Export.”.

> ---
>  gnu/services/nix.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
> index e73203c2c5..5a0a965a69 100644
> --- a/gnu/services/nix.scm
> +++ b/gnu/services/nix.scm
> @@ -35,7 +35,8 @@
>    #:use-module (ice-9 match)
>    #:use-module (ice-9 format)
>    #:use-module (guix modules)
> -  #:export (nix-service-type))
> +  #:export (nix-configuration
> +            nix-service-type))

OK, but also export ‘nix-configuration?’.


Thanks,
Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42489; Package guix-patches. (Sat, 25 Jul 2020 08:33:01 GMT) Full text and rfc822 format available.

Message #14 received at 42489 <at> debbugs.gnu.org (full text, mbox):

From: Peng Mei Yu <pengmeiyu <at> riseup.net>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 42489 <at> debbugs.gnu.org
Subject: Re: [bug#42489] [PATCH] services: nix: Provide nix commands.
Date: Sat, 25 Jul 2020 16:31:45 +0800
Hi,

Oleg Pykhalov writes:

>> @@ -134,7 +135,9 @@ GID."
>>     (extensions
>>      (list (service-extension shepherd-root-service-type nix-shepherd-service)
>>            (service-extension account-service-type nix-accounts)
>> -          (service-extension activation-service-type nix-activation)))
>> +          (service-extension activation-service-type nix-activation)
>> +          (service-extension profile-service-type
>> +                             (compose list nix-configuration-package))))
>>     (description "Run the Nix daemon.")
>>     (default-value (nix-configuration))))
>
> I don't understand what you trying to archive.
>
> Do you want to run `/gnu/store/…nix…/bin/nix-daemon` with flags, like
> ‘--debug’?  It's better to add ‘extra-options’ to ‘<nix-configuration>’
> record and use it in ‘nix-shepherd-service’.

No.  The nix-service is useless without commands like nix, nix-env,
nix-shell, etc.  I think it's a standard that a guix service should
provide necessary commands in order to use that service.

>> @@ -35,7 +35,8 @@
>>    #:use-module (ice-9 match)
>>    #:use-module (ice-9 format)
>>    #:use-module (guix modules)
>> -  #:export (nix-service-type))
>> +  #:export (nix-configuration
>> +            nix-service-type))
>
> OK, but also export ‘nix-configuration?’.

That's fine.  All I want is to be able to customize the
"extra-config".

Thanks.




Reply sent to Oleg Pykhalov <go.wigust <at> gmail.com>:
You have taken responsibility. (Sat, 25 Jul 2020 09:34:01 GMT) Full text and rfc822 format available.

Notification sent to Peng Mei Yu <i <at> pengmeiyu.com>:
bug acknowledged by developer. (Sat, 25 Jul 2020 09:34:02 GMT) Full text and rfc822 format available.

Message #19 received at 42489-done <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Peng Mei Yu <pengmeiyu <at> riseup.net>
Cc: 42489-done <at> debbugs.gnu.org
Subject: Re: [bug#42489] [PATCH] services: nix: Provide nix commands.
Date: Sat, 25 Jul 2020 12:33:19 +0300
[Message part 1 (text/plain, inline)]
Peng Mei Yu <pengmeiyu <at> riseup.net> writes:

>> @@ -134,7 +135,9 @@ GID."
>>     (extensions
>>      (list (service-extension shepherd-root-service-type nix-shepherd-service)
>>            (service-extension account-service-type nix-accounts)
>> -          (service-extension activation-service-type nix-activation)))
>> +          (service-extension activation-service-type nix-activation)
>> +          (service-extension profile-service-type
>> +                             (compose list nix-configuration-package))))
>>     (description "Run the Nix daemon.")
>>     (default-value (nix-configuration))))
>
> The nix-service is useless without commands like nix, nix-env,
> nix-shell, etc.  I think it's a standard that a guix service should
> provide necessary commands in order to use that service.

Ah, good catch!  Pushed your changes to master.

Thanks again,
Oleg.
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 22 Aug 2020 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 219 days ago.

Previous Next


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