unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add dwm.
@ 2013-03-31 22:31 Cyril Roelandt
  2013-03-31 22:39 ` Cyril Roelandt
  2013-04-03  8:20 ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Cyril Roelandt @ 2013-03-31 22:31 UTC (permalink / raw)
  To: bug-guix

* gnu/packages/dwm.scm: New file.
* Makefile.am: Add it.
---
Hello!

This patch can be applied again the xorg branch. It adds dwm, which may not be
extremely useful since, according to its developers "because dwm is customized
through editing its source code, it’s pointless to make binary packages of it".

I had to turn '${CC}' into 'gcc' in the Makefile, because ${CC} was 'cc', and
there was no 'cc' command available. Would it make sense to create a symlink
when installing gcc ?

Cyril.

 Makefile.am          |    1 +
 gnu/packages/dwm.scm |   86 ++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 87 insertions(+)
 create mode 100644 gnu/packages/dwm.scm

diff --git a/Makefile.am b/Makefile.am
index 9b9bdbf..d9736ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -73,6 +73,7 @@ MODULES =					\
   gnu/packages/cyrus-sasl.scm			\
   gnu/packages/dejagnu.scm			\
   gnu/packages/ddrescue.scm			\
+  gnu/packages/dwm.scm				\
   gnu/packages/ed.scm				\
   gnu/packages/emacs.scm			\
   gnu/packages/file.scm				\
diff --git a/gnu/packages/dwm.scm b/gnu/packages/dwm.scm
new file mode 100644
index 0000000..bebad03
--- /dev/null
+++ b/gnu/packages/dwm.scm
@@ -0,0 +1,86 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
+;;;
+;;; 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/>.
+
+(define-module (gnu packages dwm)
+  #:use-module (guix licenses)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages xorg))
+
+(define-public dwm
+  (package
+    (name "dwm")
+    (version "6.0")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://dl.suckless.org/dwm/dwm-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32 "0mpbivy9j80l1jqq4bd4g4z8s5c54fxrjj44avmfwncjwqylifdj"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:phases
+       (alist-replace
+        'configure
+        (lambda _
+         (substitute* "Makefile" (("\\$\\{CC\\}") "gcc"))
+         #t)
+        (alist-replace
+         'install
+         (lambda* (#:key outputs #:allow-other-keys)
+          (let ((out (assoc-ref outputs "out")))
+           (zero?
+            (system* "make" "install"
+             (string-append "DESTDIR=" out) "PREFIX="))))
+         %standard-phases))))
+    (inputs
+     `(("libx11" ,libx11)
+       ("libxinerama" ,libxinerama)))
+    (home-page "http://dwm.suckless.org/")
+    (synopsis "Dynamic window manager")
+    (description
+     "dwm is a dynamic window manager for X. It manages windows in tiled,
+monocle and floating layouts. All of the layouts can be applied dynamically,
+optimising the environment for the application in use and the task performed.
+
+In tiled layout windows are managed in a master and stacking area. The master
+area contains the window which currently needs most attention, whereas the
+stacking area contains all other windows. In monocle layout all windows are
+maximised to the screen size. In floating layout windows can be resized and
+moved freely. Dialog windows are always managed floating, regardless of the
+layout applied.
+
+Windows are grouped by tags. Each window can be tagged with one or multiple
+tags. Selecting certain tags displays all windows with these tags.
+
+Each screen contains a small status bar which displays all available tags, the
+layout, the number of visible windows, the title of the focused window, and the
+text read from the root window name property, if the screen is focused. A
+floating window is indicated with an empty square and a maximised floating
+window is indicated with a filled square before the windows title. The selected
+tags are indicated with a different color. The tags of the focused window are
+indicated with a filled square in the top left corner. The tags which are
+applied to one or more windows are indicated with an empty square in the top
+left corner.
+
+dwm draws a small customizable border around windows to indicate the focus
+state.")
+    (license "x11")))
-- 
1.7.10.4

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

* Re: [PATCH] gnu: Add dwm.
  2013-03-31 22:31 [PATCH] gnu: Add dwm Cyril Roelandt
@ 2013-03-31 22:39 ` Cyril Roelandt
  2013-04-03  8:22   ` Ludovic Courtès
  2013-04-03 11:01   ` Nikita Karetnikov
  2013-04-03  8:20 ` Ludovic Courtès
  1 sibling, 2 replies; 9+ messages in thread
From: Cyril Roelandt @ 2013-03-31 22:39 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

On 04/01/2013 12:31 AM, Cyril Roelandt wrote:
> * gnu/packages/dwm.scm: New file.
> * Makefile.am: Add it.
> ---

Oh, btw: could someone try to run dwm ? The machine I use to work on 
Guix recently decided to refuse to run X, so I haven't be able to test 
this package. I'm pretty sure it works, though, since this is a really 
small and simple window manager.

Cyril.

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

* Re: [PATCH] gnu: Add dwm.
  2013-03-31 22:31 [PATCH] gnu: Add dwm Cyril Roelandt
  2013-03-31 22:39 ` Cyril Roelandt
@ 2013-04-03  8:20 ` Ludovic Courtès
  2013-04-03 21:41   ` Cyril Roelandt
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2013-04-03  8:20 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Hi!

Cyril Roelandt <tipecaml@gmail.com> skribis:

> This patch can be applied again the xorg branch. It adds dwm, which may not be
> extremely useful since, according to its developers "because dwm is customized
> through editing its source code, it’s pointless to make binary packages of it".

Interesting.  :-)

> I had to turn '${CC}' into 'gcc' in the Makefile, because ${CC} was 'cc', and
> there was no 'cc' command available. Would it make sense to create a symlink
> when installing gcc ?

Dunno.  It’s the first time we see this, no?

> +         (lambda* (#:key outputs #:allow-other-keys)
> +          (let ((out (assoc-ref outputs "out")))
> +           (zero?
> +            (system* "make" "install"
> +             (string-append "DESTDIR=" out) "PREFIX="))))

“(string-append” should be aligned with "make".

Is it really DESTDIR and not PREFIX that must be set?

> +    (license "x11")))

Typo: should be ‘x11’ (the variable).

Thanks!

Ludo’.

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

* Re: [PATCH] gnu: Add dwm.
  2013-03-31 22:39 ` Cyril Roelandt
@ 2013-04-03  8:22   ` Ludovic Courtès
  2013-04-03 11:01   ` Nikita Karetnikov
  1 sibling, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2013-04-03  8:22 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

Cyril Roelandt <tipecaml@gmail.com> skribis:

> Oh, btw: could someone try to run dwm ? The machine I use to work on
> Guix recently decided to refuse to run X, so I haven't be able to test
> this package. I'm pretty sure it works, though, since this is a really
> small and simple window manager.

I don’t want to test it right now because of the limited computing power
I have here ;-), but perhaps you could get it to talk to an X server on
a different machine, no?

Ludo’.

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

* Re: [PATCH] gnu: Add dwm.
  2013-03-31 22:39 ` Cyril Roelandt
  2013-04-03  8:22   ` Ludovic Courtès
@ 2013-04-03 11:01   ` Nikita Karetnikov
  2013-04-03 12:00     ` Ludovic Courtès
  1 sibling, 1 reply; 9+ messages in thread
From: Nikita Karetnikov @ 2013-04-03 11:01 UTC (permalink / raw)
  To: Cyril Roelandt; +Cc: bug-guix

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

> Oh, btw: could someone try to run dwm ? The machine I use to work on
> Guix recently decided to refuse to run X, so I haven't be able to test
> this package. I'm pretty sure it works, though, since this is a really
> small and simple window manager.

I'm willing to help if you provide detailed instructions.  How can I run
X in Guix?  (IIRC, the server is not working.)

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: [PATCH] gnu: Add dwm.
  2013-04-03 11:01   ` Nikita Karetnikov
@ 2013-04-03 12:00     ` Ludovic Courtès
  2013-04-03 20:34       ` Nikita Karetnikov
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2013-04-03 12:00 UTC (permalink / raw)
  To: Nikita Karetnikov; +Cc: bug-guix

Nikita Karetnikov <nikita@karetnikov.org> skribis:

>> Oh, btw: could someone try to run dwm ? The machine I use to work on
>> Guix recently decided to refuse to run X, so I haven't be able to test
>> this package. I'm pretty sure it works, though, since this is a really
>> small and simple window manager.
>
> I'm willing to help if you provide detailed instructions.  How can I run
> X in Guix?  (IIRC, the server is not working.)

You can run the X server as provided by another distro, and just get dwm
to connect to that server (by setting $DISPLAY appropriately.)

Ludo’.

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

* Re: [PATCH] gnu: Add dwm.
  2013-04-03 12:00     ` Ludovic Courtès
@ 2013-04-03 20:34       ` Nikita Karetnikov
  2013-04-04 16:49         ` Nikita Karetnikov
  0 siblings, 1 reply; 9+ messages in thread
From: Nikita Karetnikov @ 2013-04-03 20:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> You can run the X server as provided by another distro, and just get dwm
> to connect to that server (by setting $DISPLAY appropriately.)

I can start X (in a chroot) via 'xinit -- :1'*, but my mouse and
keyboard don't seem to work there (for example, I can't switch between
ttys).  Should I somehow allow a non-chroot user to access the X server?
Or should I reconfigure the server itself?

* It shows an Xterm window, but I can't type anything there.

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

* Re: [PATCH] gnu: Add dwm.
  2013-04-03  8:20 ` Ludovic Courtès
@ 2013-04-03 21:41   ` Cyril Roelandt
  0 siblings, 0 replies; 9+ messages in thread
From: Cyril Roelandt @ 2013-04-03 21:41 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

On 04/03/2013 10:20 AM, Ludovic Courtès wrote:
>
> Cyril Roelandt<tipecaml@gmail.com>  skribis:
>
>> I had to turn '${CC}' into 'gcc' in the Makefile, because ${CC} was 'cc', and
>> there was no 'cc' command available. Would it make sense to create a symlink
>> when installing gcc ?
>
> Dunno.  It’s the first time we see this, no?
>

I think so. I'm not even sure why ${CC} is expanded to 'cc'.

>> +         (lambda* (#:key outputs #:allow-other-keys)
>> +          (let ((out (assoc-ref outputs "out")))
>> +           (zero?
>> +            (system* "make" "install"
>> +             (string-append "DESTDIR=" out) "PREFIX="))))
>
> “(string-append” should be aligned with "make".
>
> Is it really DESTDIR and not PREFIX that must be set?
>

I don't know. Usually, packages use either 'prefix' (as in "./configure 
--prefix=...") or 'destdir' (as in "make install DESTIR=...), but not 
both. What's the fundamental difference between them ?

>> +    (license "x11")))
>
> Typo: should be ‘x11’ (the variable).

Good catch!

Thanks for your review.


Cyril.

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

* Re: [PATCH] gnu: Add dwm.
  2013-04-03 20:34       ` Nikita Karetnikov
@ 2013-04-04 16:49         ` Nikita Karetnikov
  0 siblings, 0 replies; 9+ messages in thread
From: Nikita Karetnikov @ 2013-04-04 16:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guix

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

> I can start X (in a chroot) via 'xinit -- :1'*, but my mouse and
> keyboard don't seem to work there (for example, I can't switch between
> ttys).

Update: My mouse works.

I installed 'dwm' and added the following to '~/.xinitrc':

exec /nix/store/bnhjxm7hrqbiykczg8hslgvw34l7jnh3-dwm-6.0/bin/dwm

Then I invoked 'xinit -- :1' and 'dwm' successfully started.  I wasn't
able to actually test it (I'm not sure how to fix the keyboard problem),
but I think that it's fine.




[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

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

end of thread, other threads:[~2013-04-04 16:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-31 22:31 [PATCH] gnu: Add dwm Cyril Roelandt
2013-03-31 22:39 ` Cyril Roelandt
2013-04-03  8:22   ` Ludovic Courtès
2013-04-03 11:01   ` Nikita Karetnikov
2013-04-03 12:00     ` Ludovic Courtès
2013-04-03 20:34       ` Nikita Karetnikov
2013-04-04 16:49         ` Nikita Karetnikov
2013-04-03  8:20 ` Ludovic Courtès
2013-04-03 21:41   ` Cyril Roelandt

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