GNU bug report logs - #38721
[PATCH] gnu: Add i3-gaps

Previous Next

Package: guix-patches;

Reported by: Alexandru-Sergiu Marton <brown121407 <at> gmail.com>

Date: Mon, 23 Dec 2019 15:12:02 UTC

Severity: normal

Tags: patch

Done: Brett Gilio <brettg <at> gnu.org>

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 38721 in the body.
You can then email your comments to 38721 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#38721; Package guix-patches. (Mon, 23 Dec 2019 15:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexandru-Sergiu Marton <brown121407 <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 23 Dec 2019 15:12:02 GMT) Full text and rfc822 format available.

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

From: Alexandru-Sergiu Marton <brown121407 <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Alexandru-Sergiu Marton <brown121407 <at> member.fsf.org>
Subject: [PATCH] gnu: Add i3-gaps
Date: Mon, 23 Dec 2019 10:51:57 +0200
* gnu/packages/wm.scm (i3-gaps): New variable.
---
 gnu/packages/wm.scm | 75 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 6c1919be56..904e2a3975 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -30,6 +30,7 @@
 ;;; Copyright © 2019 Evan Straw <evan.straw99 <at> gmail.com>
 ;;; Copyright © 2019 Brett Gilio <brettg <at> gnu.org>
 ;;; Copyright © 2019 Noodles! <nnoodle <at> chiru.no>
+;;; Copyright © 2019 Alexandru-Sergiu Marton <brown121407 <at> member.fsf.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -327,6 +328,80 @@ i3 primarily targets advanced users.  Windows are managed manually and organised
 inside containers, which can be split vertically or horizontally, and optionally
 resized.
 
+i3 uses a plain-text configuration file, and can be extended and controlled from
+many programming languages.")
+    (license license:bsd-3)))
+
+(define-public i3-gaps
+  (package
+    (name "i3-gaps")
+    (version "4.17.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/Airblader/i3/releases/download/"
+                                  version "/i3-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0gqcr6s53dk3f2y9h6cna00rnwnh4yymk96li7lbym3d84cxjzrs"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       ;; The build system tries to build in a separate directory, but that
+       ;; seems to be unnecessary.
+       (list "--disable-builddir")
+
+       ;; The test suite requires the unpackaged Xephyr X server.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'patch-session-file
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (i3 (string-append out "/bin/i3"))
+                    (i3-with-shmlog (string-append out "/bin/i3-with-shmlog")))
+               (substitute* (string-append out "/share/xsessions/i3.desktop")
+                 (("Exec=i3") (string-append "Exec=" i3)))
+               (substitute* (string-append out "/share/xsessions/i3-with-shmlog.desktop")
+                 (("Exec=i3-with-shmlog") (string-append "Exec=" i3-with-shmlog)))
+               #t))))))
+    (inputs
+     `(("libxcb" ,libxcb)
+       ("xcb-util" ,xcb-util)
+       ("xcb-util-cursor" ,xcb-util-cursor)
+       ("xcb-util-keysyms" ,xcb-util-keysyms)
+       ("xcb-util-wm" ,xcb-util-wm)
+       ("xcb-util-xrm" ,xcb-util-xrm)
+       ("libxkbcommon" ,libxkbcommon)
+       ("libev" ,libev)
+       ("libyajl" ,libyajl)
+       ("asciidoc" ,asciidoc)
+       ("xmlto" ,xmlto)
+       ("perl-pod-simple" ,perl-pod-simple)
+       ("libx11" ,libx11)
+       ("pcre" ,pcre)
+       ("startup-notification" ,startup-notification)
+       ("pango" ,pango)
+       ("cairo" ,cairo)))
+    (native-inputs
+     `(("which" ,which)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ;; For building the documentation.
+       ("libxml2" ,libxml2)
+       ("docbook-xsl" ,docbook-xsl)))
+    (home-page "https://github.com/Airblader/i3")
+    (synopsis "Tiling window manager with gaps")
+    (description "i3-gaps is a fork of i3wm, a tiling window manager for X11.
+It is kept up to date with upstream, adding a few additional features such
+as gaps between windows.
+
+i3 is a tiling X11 window manager that dynamically manages
+tiled, stacked, and tabbed window layouts.
+
+i3 primarily targets advanced users.  Windows are managed manually and organised
+inside containers, which can be split vertically or horizontally, and optionally
+resized.
+
 i3 uses a plain-text configuration file, and can be extended and controlled from
 many programming languages.")
     (license license:bsd-3)))
-- 
2.24.1





Reply sent to Brett Gilio <brettg <at> gnu.org>:
You have taken responsibility. (Tue, 24 Dec 2019 02:20:02 GMT) Full text and rfc822 format available.

Notification sent to Alexandru-Sergiu Marton <brown121407 <at> gmail.com>:
bug acknowledged by developer. (Tue, 24 Dec 2019 02:20:02 GMT) Full text and rfc822 format available.

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

From: Brett Gilio <brettg <at> gnu.org>
To: Alexandru-Sergiu Marton <brown121407 <at> gmail.com>
Cc: Alexandru-Sergiu Marton <brown121407 <at> member.fsf.org>,
 38721-done <at> debbugs.gnu.org
Subject: Re: [bug#38721] [PATCH] gnu: Add i3-gaps
Date: Mon, 23 Dec 2019 20:19:33 -0600
Alexandru-Sergiu Marton <brown121407 <at> gmail.com> writes:

> * gnu/packages/wm.scm (i3-gaps): New variable.
> ---
>  gnu/packages/wm.scm | 75 +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 75 insertions(+)
>
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index 6c1919be56..904e2a3975 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -30,6 +30,7 @@
>  ;;; Copyright © 2019 Evan Straw <evan.straw99 <at> gmail.com>
>  ;;; Copyright © 2019 Brett Gilio <brettg <at> gnu.org>
>  ;;; Copyright © 2019 Noodles! <nnoodle <at> chiru.no>
> +;;; Copyright © 2019 Alexandru-Sergiu Marton <brown121407 <at> member.fsf.org>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -327,6 +328,80 @@ i3 primarily targets advanced users.  Windows are managed manually and organised
>  inside containers, which can be split vertically or horizontally, and optionally
>  resized.
>  
> +i3 uses a plain-text configuration file, and can be extended and controlled from
> +many programming languages.")
> +    (license license:bsd-3)))
> +
> +(define-public i3-gaps
> +  (package
> +    (name "i3-gaps")
> +    (version "4.17.1")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (string-append "https://github.com/Airblader/i3/releases/download/"
> +                                  version "/i3-" version ".tar.bz2"))
> +              (sha256
> +               (base32
> +                "0gqcr6s53dk3f2y9h6cna00rnwnh4yymk96li7lbym3d84cxjzrs"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:configure-flags
> +       ;; The build system tries to build in a separate directory, but that
> +       ;; seems to be unnecessary.
> +       (list "--disable-builddir")
> +
> +       ;; The test suite requires the unpackaged Xephyr X server.
> +       #:tests? #f
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'patch-session-file
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (i3 (string-append out "/bin/i3"))
> +                    (i3-with-shmlog (string-append out "/bin/i3-with-shmlog")))
> +               (substitute* (string-append out "/share/xsessions/i3.desktop")
> +                 (("Exec=i3") (string-append "Exec=" i3)))
> +               (substitute* (string-append out "/share/xsessions/i3-with-shmlog.desktop")
> +                 (("Exec=i3-with-shmlog") (string-append "Exec=" i3-with-shmlog)))
> +               #t))))))
> +    (inputs
> +     `(("libxcb" ,libxcb)
> +       ("xcb-util" ,xcb-util)
> +       ("xcb-util-cursor" ,xcb-util-cursor)
> +       ("xcb-util-keysyms" ,xcb-util-keysyms)
> +       ("xcb-util-wm" ,xcb-util-wm)
> +       ("xcb-util-xrm" ,xcb-util-xrm)
> +       ("libxkbcommon" ,libxkbcommon)
> +       ("libev" ,libev)
> +       ("libyajl" ,libyajl)
> +       ("asciidoc" ,asciidoc)
> +       ("xmlto" ,xmlto)
> +       ("perl-pod-simple" ,perl-pod-simple)
> +       ("libx11" ,libx11)
> +       ("pcre" ,pcre)
> +       ("startup-notification" ,startup-notification)
> +       ("pango" ,pango)
> +       ("cairo" ,cairo)))
> +    (native-inputs
> +     `(("which" ,which)
> +       ("perl" ,perl)
> +       ("pkg-config" ,pkg-config)
> +       ;; For building the documentation.
> +       ("libxml2" ,libxml2)
> +       ("docbook-xsl" ,docbook-xsl)))
> +    (home-page "https://github.com/Airblader/i3")
> +    (synopsis "Tiling window manager with gaps")
> +    (description "i3-gaps is a fork of i3wm, a tiling window manager for X11.
> +It is kept up to date with upstream, adding a few additional features such
> +as gaps between windows.
> +
> +i3 is a tiling X11 window manager that dynamically manages
> +tiled, stacked, and tabbed window layouts.
> +
> +i3 primarily targets advanced users.  Windows are managed manually and organised
> +inside containers, which can be split vertically or horizontally, and optionally
> +resized.
> +
>  i3 uses a plain-text configuration file, and can be extended and controlled from
>  many programming languages.")
>      (license license:bsd-3)))

Hi, Alexandru-Sergiu Marton.

Thank you for your patch. By the looks of it, this is your first patch
submission to GNU Guix! Thank you.

I want to offer you some kind advice. You may not be familiar with our
inheritance mechanism. Since i3-gaps is really just a derivative form of
core i3, we can actually just inherit the package parameters, arguments,
inputs, etc. modifying only what we need to.

In other-words, your definition can be /massively/ reduced as follows:

--8<---------------cut here---------------start------------->8---
(define-public i3-gaps
  (package (inherit i3-wm)
           (name "i3-gaps")
           (version "4.17.1")
           (source (origin
                     (method url-fetch)
                     (uri (string-append
                           "https://github.com/Airblader/i3/releases/download/"
                           version "/i3-" version ".tar.bz2"))
                     (sha256
                      (base32
                       "0iazv2i2rgmakzh95pgj6iapyzn7bdpcbcd35a79mhlml4ry33qy"))))
           (build-system gnu-build-system)
           (home-page "https://github.com/Airblader/i3")
           (synopsis "Tiling window manager with gaps")
           (description "i3-gaps is a fork of i3wm, a tiling window manager
for X11.  It is kept up to date with upstream, adding a few additional
features such as gaps between windows.

i3 is a tiling X11 window manager that dynamically manages tiled, stacked,
and tabbed window layouts.

i3 primarily targets advanced users.  Windows are managed manually and
organised inside containers, which can be split vertically or horizontally,
and optionally resized.

i3 uses a plain-text configuration file, and can be extended and controlled
from many programming languages.")
           (license license:bsd-3)))
--8<---------------cut here---------------end--------------->8---

I went ahead and pushed this to master with you as the author, and me as
a co-author. I used your <brown121407 <at> member.fsf.org> email address for
the git config.

Again, welcome! We are happy to have you around.

88c9408070280db51d1a0e604b9ec77f1611ab3c. Closing.

-- 
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
<brettg <at> gnu.org> <brettg <at> posteo.net>




Information forwarded to guix-patches <at> gnu.org:
bug#38721; Package guix-patches. (Wed, 25 Dec 2019 08:16:01 GMT) Full text and rfc822 format available.

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

From: Sergiu Marton <brown121407 <at> gmail.com>
To: 38721 <at> debbugs.gnu.org
Cc: brettg <at> gnu.org
Subject: Re: [bug#38721] [PATCH] gnu: Add i3-gaps
Date: Wed, 25 Dec 2019 08:15:32 +0000
After it got merged into master with the inheritance modification, I
installed it over the one I had installed from my original script and
it seemed to work fine. But I think that's just because I didn't
reboot to reload the i3 executable.

Now that I shutdown and opened my machine again, i3-gaps specific
commands don't work. To test this, write `i3-msg gaps` in a shell. If
it does NOT work, it will output something like:

brown <at> 121407 ~$ i3-msg gaps
ERROR: Your command: gaps
ERROR:               ^^^^
ERROR: Expected one of these tokens: <a long list of stuff that
represent valid commands>

However, it seems that gaps work if I remove the package, install it
from the original package definition (without Brett's (inherit i3-wm))
and reboot. The following output means that i3-gaps has been correctly
installed:

brown <at> 121407 ~$ i3-msg gaps
ERROR: Your command: gaps
ERROR:
ERROR: Expected one of these tokens: 'inner', 'outer', 'horizontal',
'vertical', 'top', 'right', 'bottom', 'left'

This is strange. I still don't know enough about the packaging API to
troubleshoot this all just by having a quick look at i3-gaps'
definition. I'll try to investigate this issue but I encourage someone
more knowledgeable than me too look into this too.




Information forwarded to guix-patches <at> gnu.org:
bug#38721; Package guix-patches. (Wed, 25 Dec 2019 08:27:02 GMT) Full text and rfc822 format available.

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

From: Brett Gilio <brettg <at> gnu.org>
To: Sergiu Marton <brown121407 <at> gmail.com>
Cc: 38721 <at> debbugs.gnu.org
Subject: Re: [bug#38721] [PATCH] gnu: Add i3-gaps
Date: Wed, 25 Dec 2019 08:26:39 +0000 (UTC)

Dec 25, 2019 2:16:09 AM Sergiu Marton :

> After it got merged into master with the inheritance modification, I
> installed it over the one I had installed from my original script and
> it seemed to work fine. But I think that's just because I didn't
> reboot to reload the i3 executable.
>
> Now that I shutdown and opened my machine again, i3-gaps specific
> commands don't work. To test this, write `i3-msg gaps` in a shell. If
> it does NOT work, it will output something like:
>
> brown <at> 121407 ~$ i3-msg gaps
> ERROR: Your command: gaps
> ERROR: ^^^^
> ERROR: Expected one of these tokens: > represent valid commands>
>
> However, it seems that gaps work if I remove the package, install it
> from the original package definition (without Brett's (inherit i3-wm))
> and reboot. The following output means that i3-gaps has been correctly
> installed:
>
> brown <at> 121407 ~$ i3-msg gaps
> ERROR: Your command: gaps
> ERROR:
> ERROR: Expected one of these tokens: 'inner', 'outer', 'horizontal',
> 'vertical', 'top', 'right', 'bottom', 'left'
>
> This is strange. I still don't know enough about the packaging API to
> troubleshoot this all just by having a quick look at i3-gaps'
> definition. I'll try to investigate this issue but I encourage someone
> more knowledgeable than me too look into this too.
>

Hi Sergiu. Since this is closed and an issue for adding a new package, and your issue is about the new package will you open a new bug report at bug-guix <at> gnu.org? You can basically reuse your statement and link to this closed issue .

Thanks!

-- 
Brett M. Gilio
GNU Guix, Contributor | GNU Project, Webmaster
[DFC0 C7F7 9EE6 0CA7 AE55 5E19 6722 43C4 A03F 0EEE]
< brettg <at> gnu.org [mailto:brettg <at> gnu.org] > < brettg <at> posteo.net [mailto:brettg <at> posteo.net] >





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

This bug report was last modified 5 years and 155 days ago.

Previous Next


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