unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#46018] [PATCH] Add dwl.
       [not found] <87h7najxlb.fsf@qq.com>
@ 2021-01-21 12:14 ` Z572
  2021-01-23 11:15   ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Z572 @ 2021-01-21 12:14 UTC (permalink / raw)
  To: 46018

[-- Attachment #1: 0001-gnu-Add-dwl.patch --]
[-- Type: text/x-patch, Size: 2944 bytes --]

From fa60adfd7b2b48ea12a1ed66e7da9db94412e3af Mon Sep 17 00:00:00 2001
From: Zheng Junjie <873216071@qq.com>
Date: Thu, 21 Jan 2021 20:12:13 +0800
Subject: [PATCH] gnu: Add dwl.

---
 gnu/packages/wm.scm | 48 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 084822f2c7..682fc69dbe 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
 ;; Copyright © 2020 Niklas Eklund <niklas.eklund@posteo.net>
 ;;; Copyright © 2020 Robert Smith <robertsmith@posteo.net>
+;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1258,6 +1259,53 @@ It is inspired by Xmonad and dwm.  Its major features include:
 project derived from the original Calm Window Manager.")
     (license license:isc)))
 
+(define-public dwl
+  (package
+    (name "dwl")
+    (version "0.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/djpohly/dwl")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "18g2sx8cv54zl5iw5m9lzngrp6ra2pyp7c68qps2ava3brw9m0j2"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; no tests
+       #:make-flags
+       (list
+        "CC=gcc"
+        (string-append "PREFIX=" %output))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure
+         (replace 'install              ; no install targer
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (install-file "dwl" bin)))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("wlroots" ,wlroots)))
+    (home-page "https://github.com/djpohly/dwl")
+    (synopsis "Dwm for Wayland")
+    (description
+     "A compact, hackable compositor for Wayland based on wlroots.  It is
+intended to fill the same space in the Wayland world that dwm does in X11,
+primarily in terms of philosophy, and secondarily in terms of functionality.
+Like dwm, dwl is:
+@itemize
+@item Easy to understand, hack on, and extend with patches
+@item One C source file (or a very small number) configurable via config.h
+@item Limited to 2000 SLOC to promote hackability
+@item Tied to as few external dependencies as possible
+@end itemize")      ;; LICENSE   LICENSE.dwm  LICENSE.tinywl
+    (license (list license:gpl3+ license:expat license:cc0))))
+
 (define-public nitrogen
   (package
     (name "nitrogen")
-- 
2.30.0





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

* [bug#46018] [PATCH] Add dwl.
  2021-01-21 12:14 ` [bug#46018] [PATCH] Add dwl Z572
@ 2021-01-23 11:15   ` Nicolas Goaziou
       [not found]     ` <87bldfrgoh.fsf_-_@qq.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2021-01-23 11:15 UTC (permalink / raw)
  To: Z572; +Cc: 46018

Hello,

Z572 <873216071@qq.com> writes:

> Subject: [PATCH] gnu: Add dwl.

Thank you! Some comments follow.

> +(define-public dwl
> +  (package
> +    (name "dwl")
> +    (version "0.1")
> +    (source (origin
> +              (method git-fetch)
> +              (uri (git-reference
> +                    (url "https://github.com/djpohly/dwl")
> +                    (commit (string-append "v" version))))
> +              (file-name (git-file-name name version))
> +              (sha256
> +               (base32
> +                "18g2sx8cv54zl5iw5m9lzngrp6ra2pyp7c68qps2ava3brw9m0j2"))))
> +    (build-system gnu-build-system)
> +    (arguments
> +     `(#:tests? #f                      ; no tests
> +       #:make-flags
> +       (list
> +        "CC=gcc"

Instead of "CC=gcc", you should use

                 (string-append "CC=" ,(cc-for-target))

for cross-compilation.

> +        (string-append "PREFIX=" %output))

Here, I think it is preferable to use

          (string-append "PREFIX=" (assoc-ref %outputs "out"))

> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)            ; no configure
> +         (replace 'install              ; no install targer

Typo: ";no install target"

> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out"))
> +                    (bin (string-append out "/bin")))
> +               (install-file "dwl" bin)))))))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("wlroots" ,wlroots)))
> +    (home-page "https://github.com/djpohly/dwl")
> +    (synopsis "Dwm for Wayland")

It would be nice to expound Dwm, e.g.,

  "Dynamic window manager for Wayland"

> +    (description
> +     "A compact, hackable compositor for Wayland based on wlroots.  It is

This should be a complete sentence, e.g.,

  Dwl is a compact, hackable...
   
> +intended to fill the same space in the Wayland world that dwm does in X11,
> +primarily in terms of philosophy, and secondarily in terms of functionality.
> +Like dwm, dwl is:
> +@itemize
> +@item Easy to understand, hack on, and extend with patches
> +@item One C source file (or a very small number) configurable via config.h
> +@item Limited to 2000 SLOC to promote hackability
> +@item Tied to as few external dependencies as possible

I suggest rewrite so it doesn't include a list. For example:

  Like dwm, dwl is easy to understand and hack on, due to a limited
  size and a few external dependencies.  It is configurable via @file{config.h}.

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou




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

* [bug#46018] [PATCH] Add dwl.
       [not found]     ` <87bldfrgoh.fsf_-_@qq.com>
@ 2021-01-23 12:17       ` Z572
  2021-02-12  7:35         ` bug#46018: " 宋文武
  0 siblings, 1 reply; 4+ messages in thread
From: Z572 @ 2021-01-23 12:17 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 46018

[-- Attachment #1: 0001-gnu-Add-dwl.patch --]
[-- Type: text/x-patch, Size: 2886 bytes --]

From 19ea34ad94d10453e0b6697a835217df50a34d45 Mon Sep 17 00:00:00 2001
From: Zheng Junjie <873216071@qq.com>
Date: Thu, 21 Jan 2021 20:12:13 +0800
Subject: [PATCH] gnu: Add dwl.

---
 gnu/packages/wm.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 084822f2c7..38e0d5ea98 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
 ;; Copyright © 2020 Niklas Eklund <niklas.eklund@posteo.net>
 ;;; Copyright © 2020 Robert Smith <robertsmith@posteo.net>
+;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1258,6 +1259,49 @@ It is inspired by Xmonad and dwm.  Its major features include:
 project derived from the original Calm Window Manager.")
     (license license:isc)))
 
+(define-public dwl
+  (package
+    (name "dwl")
+    (version "0.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/djpohly/dwl")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "18g2sx8cv54zl5iw5m9lzngrp6ra2pyp7c68qps2ava3brw9m0j2"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f                      ; no tests
+       #:make-flags
+       (list
+        (string-append "CC=" ,(cc-for-target))
+        (string-append "PREFIX=" (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)            ; no configure
+         (replace 'install              ; no install target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (install-file "dwl" bin)))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("wlroots" ,wlroots)))
+    (home-page "https://github.com/djpohly/dwl")
+    (synopsis "Dynamic window manager for Wayland")
+    (description
+     "A compact, hackable compositor for Wayland based on wlroots.  It is
+intended to fill the same space in the Wayland world that dwm does in X11,
+primarily in terms of philosophy, and secondarily in terms of functionality.
+Like dwm, dwl is easy to understand and hack on, due to a limited size and
+ a few external dependencies.  It is configurable via @file{config.h}.")
+    ;;             LICENSE       LICENSE.dwm   LICENSE.tinywl
+    (license (list license:gpl3+ license:expat license:cc0))))
+
 (define-public nitrogen
   (package
     (name "nitrogen")
-- 
2.30.0





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

* bug#46018: [PATCH] Add dwl.
  2021-01-23 12:17       ` Z572
@ 2021-02-12  7:35         ` 宋文武
  0 siblings, 0 replies; 4+ messages in thread
From: 宋文武 @ 2021-02-12  7:35 UTC (permalink / raw)
  To: Z572; +Cc: 46018-done, Nicolas Goaziou

Pushed, thank you for the patch, and Nicolas Goaziou for the review!




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

end of thread, other threads:[~2021-02-12  7:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87h7najxlb.fsf@qq.com>
2021-01-21 12:14 ` [bug#46018] [PATCH] Add dwl Z572
2021-01-23 11:15   ` Nicolas Goaziou
     [not found]     ` <87bldfrgoh.fsf_-_@qq.com>
2021-01-23 12:17       ` Z572
2021-02-12  7:35         ` bug#46018: " 宋文武

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).