[PATCH] gnu: Add distrobox.

  • Done
  • quality assurance status badge
Details
4 participants
  • Adam Faiz
  • Nicolas Goaziou
  • omlet
  • Ricardo Wurmus
Owner
unassigned
Submitted by
Adam Faiz
Severity
normal
A
A
Adam Faiz wrote on 20 Nov 2022 15:30
(address . guix-patches@gnu.org)
ddd32c90-3933-a942-3754-98862af0fad0@disroot.org
From 1fc7bf3f3c35490f95e223fef9c83ef7d2501dff Mon Sep 17 00:00:00 2001
From: AwesomeAdam54321 <adam.faiz@disroot.org>
Date: Fri, 18 Nov 2022 10:51:30 +0800
Subject: [PATCH] gnu: Add distrobox.

* gnu/packages/containers.scm (distrobox): New variable.
---
gnu/packages/containers.scm | 39 ++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)

Toggle diff (66 lines)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index 59eea423a1..384a263e2e 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -26,6 +26,7 @@ (define-module (gnu packages containers)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system meson)
@@ -46,7 +47,8 @@ (define-module (gnu packages containers)
#:use-module (gnu packages selinux)
#:use-module (gnu packages version-control)
#:use-module (gnu packages virtualization)
- #:use-module (gnu packages web))
+ #:use-module (gnu packages web)
+ #:use-module (gnu packages wget))

(define-public crun
(let ((commit "c381048530aa750495cf502ddb7181f2ded5b400"))
@@ -354,3 +356,38 @@ (define-public podman
volumes mounted into those containers, and pods made from groups of
containers.")
(license license:asl2.0)))
+
+(define-public distrobox
+ (package
+ (name "distrobox")
+ (version "1.4.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/89luca89/distrobox")
+ (commit version)))
+ (sha256
+ (base32 "1qc66ghlq6b0nh4gk8ls64njwv96pkhz0p31k40fnicxwkfnb2jq"))
+ (file-name (git-file-name name version))))
+ (build-system copy-build-system)
+ (inputs
+ (list podman wget))
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'refer-to-inputs
+ (lambda _
+ (substitute* (find-files "." "^distrobox.*")
+ (("podman") (string-append #$(this-package-input
"podman") "/bin/podman"))
+ (("wget") (string-append #$(this-package-input
"wget") "/bin/wget"))
+ (("command -v") "test -x"))))
+ (replace 'install
+ (lambda _
+ (invoke "./install" "--prefix" #$output))))))
+ (home-page "https://distrobox.privatedns.org/")
+ (synopsis "Fancy wrapper to create and start containers highly
integrated with the hosts")
+ (description
+ "Distrobox is a fancy wrapper around Podman or Docker
+to create and start containers highly integrated with the hosts.")
+ (license license:gpl3+)))
--
2.38.0
R
R
Ricardo Wurmus wrote on 19 Dec 2022 17:30
(address . 59410@debbugs.gnu.org)
87h6xrnyd0.fsf@elephly.net
Hi,

thanks for the patch.

I’m always a bit worried when I see the copy-build-system, because the
lack of a configuration step often means that the tool makes possibly
invalid assumptions about the runtime environment.

I see that you’re patching the locations of “podman”, “wget”, and
“command -v”, but the tools contain even more references, e.g. to
“curl”, “grep”, “sed”, coreutils, “host-spawn”, “sudo”, “pinentry”,
“less”, …

It may be a better idea to wrap all the executables in a reasonable
default environment.

What do you think?

--
Ricardo
O
(address . 59410@debbugs.gnu.org)
NJeqp36--F-9@tuta.io
Its possible approved the package?
--
Enviado de forma segura com Tutanota. Obtenha a sua caixa de correio criptografada, sem publicidade.
Attachment: file
A
A
Adam Faiz wrote on 20 Dec 2022 02:25
(address . 59410@debbugs.gnu.org)(address . rekado@elephly.net)
6784f1f9-f631-711d-0cdc-22f101c50e3c@disroot.org
Toggle quote (17 lines)
> Hi,
>
> thanks for the patch.
>
> I’m always a bit worried when I see the copy-build-system, because the
> lack of a configuration step often means that the tool makes possibly
> invalid assumptions about the runtime environment.
>
> I see that you’re patching the locations of “podman”, “wget”, and
> “command -v”, but the tools contain even more references, e.g. to
> “curl”, “grep”, “sed”, coreutils, “host-spawn”, “sudo”, “pinentry”,
> “less”, …
>
> It may be a better idea to wrap all the executables in a reasonable
> default environment.
>
> What do you think?
It sounds like a good idea.

Toggle quote (2 lines)
> --
> Ricardo
O
[PATCH] gnu: Add distrobox.
(address . 59410@debbugs.gnu.org)
NLqQKQa--R-9@tuta.io
I don't know how much longer the official packaging for guix will take, but with the distrobox it will be possible to download many free software applications that are taking to be brought to the guix package manager
Attachment: file
N
N
Nicolas Goaziou wrote on 4 Feb 2023 00:16
(name . Adam Faiz via Guix-patches via)(address . guix-patches@gnu.org)
874js2z6ff.fsf@nicolasgoaziou.fr
Hello,

Adam Faiz via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (2 lines)
> Subject: [PATCH] gnu: Add distrobox.

Applied with the changes below. Thank you.

Toggle quote (5 lines)
> +(define-public distrobox
> + (package
> + (name "distrobox")
> + (version "1.4.1")

I updated it to latest version.

Toggle quote (23 lines)
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/89luca89/distrobox")
> + (commit version)))
> + (sha256
> + (base32 "1qc66ghlq6b0nh4gk8ls64njwv96pkhz0p31k40fnicxwkfnb2jq"))
> + (file-name (git-file-name name version))))
> + (build-system copy-build-system)
> + (inputs
> + (list podman wget))
> + (arguments
> + (list #:phases
> + #~(modify-phases %standard-phases
> + (add-before 'install 'refer-to-inputs
> + (lambda _
> + (substitute* (find-files "." "^distrobox.*")
> + (("podman") (string-append #$(this-package-input
> "podman") "/bin/podman"))
> + (("wget") (string-append #$(this-package-input
> "wget") "/bin/wget"))

I used `search-input-file' instead of `this-package-input'.

Toggle quote (2 lines)
> + (license license:gpl3+)))

License seems to be GPL3 only, so I changed it.

Regards,
--
Nicolas Goaziou
?