unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* CLI reorganization revisited (Was: Re: Another cli interface for guix/sd)
@ 2018-11-05 21:24 swedebugia
  2018-11-06 14:24 ` CLI reorganization revisited Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: swedebugia @ 2018-11-05 21:24 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1113 bytes --]

------------------------------------------------------------------------
*From*: 	Ludovic Courtès
*Subject*: 	Re: Another cli interface for guix/sd
*Date*: 	Thu, 30 Mar 2017 16:46:33 +0200
*User-agent*: 	Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)


> For a start, I think we should focus on ‘guix package’ since there’s
> consensus that it does too much.  What do we leave in it?  What do we
> take out?  Should we add a ‘guix profile’ command to deal with
> generations, but not to install/remove/upgrade packages?
>
> Similarly, as has been discussed before, we should probably add ‘guix
> install’, ‘guix remove’, and ‘guix upgrade’ aliases that do what we
> would expect.
>
> Thoughts?
+1
Did anything happen after this message above by Ludo'? (source https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00845.html)

I like the idea of taking generation and profile out of package.

I would like to go ahead preparing a patch for the aliases for ‘guix install’, ‘guix remove’, and ‘guix upgrade’.

Any thoughts?

-- 
Cheers
Swedebugia


[-- Attachment #2: Type: text/html, Size: 3626 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: CLI reorganization revisited
  2018-11-05 21:24 CLI reorganization revisited (Was: Re: Another cli interface for guix/sd) swedebugia
@ 2018-11-06 14:24 ` Ludovic Courtès
  2018-11-08 22:18   ` swedebugia
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2018-11-06 14:24 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

Hello,

swedebugia <swedebugia@riseup.net> skribis:

> ------------------------------------------------------------------------
> *From*: 	Ludovic Courtès
> *Subject*: 	Re: Another cli interface for guix/sd
> *Date*: 	Thu, 30 Mar 2017 16:46:33 +0200
> *User-agent*: 	Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
>
>
>> For a start, I think we should focus on ‘guix package’ since there’s
>> consensus that it does too much.  What do we leave in it?  What do we
>> take out?  Should we add a ‘guix profile’ command to deal with
>> generations, but not to install/remove/upgrade packages?
>>
>> Similarly, as has been discussed before, we should probably add ‘guix
>> install’, ‘guix remove’, and ‘guix upgrade’ aliases that do what we
>> would expect.
>>
>> Thoughts?
> +1
> Did anything happen after this message above by Ludo'? (source https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00845.html)

No.

> I like the idea of taking generation and profile out of package.

Yeah, I’m not so sure.  :-)

> I would like to go ahead preparing a patch for the aliases for ‘guix install’, ‘guix remove’, and ‘guix upgrade’.

That would be sweet!

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: CLI reorganization revisited
  2018-11-06 14:24 ` CLI reorganization revisited Ludovic Courtès
@ 2018-11-08 22:18   ` swedebugia
  2018-11-08 22:46     ` Amirouche Boubekki
  0 siblings, 1 reply; 5+ messages in thread
From: swedebugia @ 2018-11-08 22:18 UTC (permalink / raw)
  To: Ludovic Courtès, guix-devel

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

Hi :)


On 2018-11-06 15:24, Ludovic Courtès wrote:
> Hello,
>
> swedebugia <swedebugia@riseup.net> skribis:
>
>> I would like to go ahead preparing a patch for the aliases for ‘guix install’, ‘guix remove’, and ‘guix upgrade’.
> That would be sweet!

I gave it a go but did not get that far. :p

This patch errors out with:

$ ./pre-inst-env guix install
ice-9/boot-9.scm:3356:22: Syntax error:
/home/sdb/guix-tree/guix/scripts/install.scm:31:2: define-module: 
expected keyword arg in subform (guix-install) of (define-module (guix 
scripts install) #:use-module ((guix ui) #:hide 
(display-profile-content)) #:use-module (guix scripts) #:use-module 
(guix scripts package) (guix-install))

I do not understand how args work. Is this documented somewhere?

Also I do not understand this form:

(define (guix-describe . args)
                   ^
What is the role of the dot?

I'm probably in way over my head here :D

Cheers
Swedebugia

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-WIP-Add-guix-install.patch --]
[-- Type: text/x-patch; name="0001-WIP-Add-guix-install.patch", Size: 2629 bytes --]

From 82a844c8c37b9a969e332ff19a87aa857881b039 Mon Sep 17 00:00:00 2001
From: swedebugia <swedebugia@riseup.net>
Date: Thu, 8 Nov 2018 22:57:49 +0100
Subject: [PATCH] WIP: 'Add guix install'.

---
 Makefile.am              |  2 ++
 guix/scripts/install.scm | 41 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)
 create mode 100644 guix/scripts/install.scm

diff --git a/Makefile.am b/Makefile.am
index c63b65ba5..2dfbef006 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,6 +12,7 @@
 # Copyright © 2018 Nils Gillmann <ng0@n0.is>
 # Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 # Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
+# Copyright © 2018 swedebugia <swedebugia@riseup.net>
 #
 # This file is part of GNU Guix.
 #
@@ -196,6 +197,7 @@ MODULES =					\
   guix/scripts/build.scm			\
   guix/scripts/archive.scm			\
   guix/scripts/import.scm			\
+  guix/scripts/install.scm			\
   guix/scripts/package.scm			\
   guix/scripts/gc.scm				\
   guix/scripts/hash.scm				\
diff --git a/guix/scripts/install.scm b/guix/scripts/install.scm
new file mode 100644
index 000000000..ebfa819a7
--- /dev/null
+++ b/guix/scripts/install.scm
@@ -0,0 +1,41 @@
+
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 swedebugia <swedebugia@riseup.net>
+
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+;;;
+;;; Alias for "guix package -i"
+;;; Needs to be in its own file because of (command-files) in guix/ui.scm
+;;;
+
+(define-module (guix scripts install)
+  #:use-module ((guix ui) #:hide (display-profile-content))
+  #:use-module (guix scripts)
+  #:use-module (guix scripts package)
+  (guix-install))
+
+;;;
+;;; Entry point.
+;;;
+
+(define (guix-install . args)
+;; How do we pass everything over to (guix scripts package)?
+  (display args)
+  (newline)
+  (display "swedebugia was here"))
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: CLI reorganization revisited
  2018-11-08 22:18   ` swedebugia
@ 2018-11-08 22:46     ` Amirouche Boubekki
  2018-11-08 23:13       ` swedebugia
  0 siblings, 1 reply; 5+ messages in thread
From: Amirouche Boubekki @ 2018-11-08 22:46 UTC (permalink / raw)
  To: swedebugia; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

>
> I do not understand how args work. Is this documented somewhere?
>
> Also I do not understand this form:
>
> (define (guix-describe . args)
>                    ^
> What is the role of the dot?
>


The dot serve as a separator between 'required' argument and 'rest'
arguments which is always a list that might be empty.
In the above case everything passed to the procedure guix-describe is
considered part of args.

HTH

[-- Attachment #2: Type: text/html, Size: 725 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: CLI reorganization revisited
  2018-11-08 22:46     ` Amirouche Boubekki
@ 2018-11-08 23:13       ` swedebugia
  0 siblings, 0 replies; 5+ messages in thread
From: swedebugia @ 2018-11-08 23:13 UTC (permalink / raw)
  To: Amirouche Boubekki; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]



On 2018-11-08 23:46, Amirouche Boubekki wrote:
>
>     I do not understand how args work. Is this documented somewhere?
>
>     Also I do not understand this form:
>
>     (define (guix-describe . args)
>                        ^
>     What is the role of the dot?
>
>
>
> The dot serve as a separator between 'required' argument and 'rest' 
> arguments which is always a list that might be empty.
> In the above case everything passed to the procedure guix-describe is 
> considered part of args.
Thank you!

I just saw that GNU Scheme implemented that as keyword: #optional!

This is more clear for the reader/beginner actually. ;-)

-- 
Cheers Swedebugia

[-- Attachment #2: Type: text/html, Size: 1724 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-09  6:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-05 21:24 CLI reorganization revisited (Was: Re: Another cli interface for guix/sd) swedebugia
2018-11-06 14:24 ` CLI reorganization revisited Ludovic Courtès
2018-11-08 22:18   ` swedebugia
2018-11-08 22:46     ` Amirouche Boubekki
2018-11-08 23:13       ` swedebugia

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).