diff mbox

gnu: Add awesome.

Message ID 1465992933-24389-1-git-send-email-carlo@zancanaro.id.au
State New
Headers show

Commit Message

Carlo Zancanaro June 15, 2016, 12:15 p.m. UTC
* gnu/packages/wm.scm (awesome): New variable.
---
 gnu/packages/wm.scm | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

Comments

Ludovic Courtès June 16, 2016, 12:38 p.m. UTC | #1
Carlo Zancanaro <carlo@zancanaro.id.au> skribis:

> * gnu/packages/wm.scm (awesome): New variable.

Pushed as 3d1240aa2561792895795315c7783a28bf4412af with a few changes.

Primarily, I built it with --rounds=2 as per
<https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>
and noticed that the ‘awesome’ binary, some PNGs, and the gzipped man
pages were not bit-reproducible (they included timestamps), so I
addressed these issues.  Now it is fully reproducible.

I also shrunk the description a bit, as per
<https://www.gnu.org/software/guix/manual/html_node/Synopses-and-Descriptions.html>,
and probably reindented a couple of things.

Thanks for the patch!

Ludo’.
Carlo Zancanaro June 16, 2016, 11:31 p.m. UTC | #2
On 16 June 2016 at 22:38, Ludovic Courtès <ludo@gnu.org> wrote:

> Primarily, I built it with --rounds=2 as per
> <
> https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>
> ...
>

I tried to build with --rounds=2, but always after I had built normally
(because I cared first about whether it compiled, then later about whether
it was deterministic). The --rounds=2 build never seemed to do anything. Is
there something I have to do to make that work? (I tried adding the --check
flag too, but it also seemed to not do anything, either with or without
--rounds.)
Leo Famulari June 16, 2016, 11:49 p.m. UTC | #3
On Fri, Jun 17, 2016 at 09:31:59AM +1000, Carlo Zancanaro wrote:
> On 16 June 2016 at 22:38, Ludovic Courtès <ludo@gnu.org> wrote:
> 
> > Primarily, I built it with --rounds=2 as per
> > <
> > https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>
> > ...
> >
> 
> I tried to build with --rounds=2, but always after I had built normally
> (because I cared first about whether it compiled, then later about whether
> it was deterministic). The --rounds=2 build never seemed to do anything. Is
> there something I have to do to make that work? (I tried adding the --check
> flag too, but it also seemed to not do anything, either with or without
> --rounds.)

Once you have built the package and it is in /gnu/store, you need to use
--check.

In that case, I'm not sure how it interacts with --rounds.

It would be good to get a reproducer if there's a bug here.
non such July 31, 2016, 9:45 p.m. UTC | #4
Leo Famulari <leo@famulari.name> writes:

> On Fri, Jun 17, 2016 at 09:31:59AM +1000, Carlo Zancanaro wrote:
>> On 16 June 2016 at 22:38, Ludovic Courtès <ludo@gnu.org> wrote:
>> 
>> > Primarily, I built it with --rounds=2 as per
>> > <
>> > https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>
>> > ...
>> >
>> 
>> I tried to build with --rounds=2, but always after I had built normally
>> (because I cared first about whether it compiled, then later about whether
>> it was deterministic). The --rounds=2 build never seemed to do anything. Is
>> there something I have to do to make that work? (I tried adding the --check
>> flag too, but it also seemed to not do anything, either with or without
>> --rounds.)
>
> Once you have built the package and it is in /gnu/store, you need to use
> --check.
>
> In that case, I'm not sure how it interacts with --rounds.
>
> It would be good to get a reproducer if there's a bug here.
>

What is the exact problem here? these are my builts:

ng0@shadowwalker ~$ guix build --rounds=2 awesome
substitute: updating list of substitutes from
'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from
'https://mirror.hydra.gnu.org'... 100.0%
substitute: updating list of substitutes from
'https://mirror.hydra.gnu.org'... 100.0%
The following derivation will be built:
   /gnu/store/3g3l3i3j6d1zn9m0xjz8dgxnfphchjgp-awesome-3.4.15.drv
   The following files will be downloaded:
      /gnu/store/dplmx20hzggiin25pqrkx9z9irz9l7cn-awesome-3.4.15
         /gnu/store/kqkznj38c8z6jppl620q8fvz7ij9j6dp-libev-4.20
            /gnu/store/zvggrli42q119zpqjd8ydxygvfj840bp-libxdg-basedir-1.2.0
            @ substituter-started
            /gnu/store/kqkznj38c8z6jppl620q8fvz7ij9j6dp-libev-4.20
            /gnu/store/04q37mcyxybzbc46j9c6pa3g8553sbgz-guix-0.10.0-0.97c8/libexec/guix/substitute

Found valid signature for
/gnu/store/kqkznj38c8z6jppl620q8fvz7ij9j6dp-libev-4.20
From
https://mirror.hydra.gnu.org/nar/kqkznj38c8z6jppl620q8fvz7ij9j6dp-libev-4.20
Downloading kqkznj…-libev-4.20 (279KiB installed)...
 libev-4.20
 931KiB/s 00:00 | 144KiB transferred
 @ substituter-succeeded
 /gnu/store/kqkznj38c8z6jppl620q8fvz7ij9j6dp-libev-4.20
 @ substituter-started
 /gnu/store/zvggrli42q119zpqjd8ydxygvfj840bp-libxdg-basedir-1.2.0
 /gnu/store/04q37mcyxybzbc46j9c6pa3g8553sbgz-guix-0.10.0-0.97c8/libexec/guix/substitute

Found valid signature for
/gnu/store/zvggrli42q119zpqjd8ydxygvfj840bp-libxdg-basedir-1.2.0
From
https://mirror.hydra.gnu.org/nar/zvggrli42q119zpqjd8ydxygvfj840bp-libxdg-basedir-1.2.0
Downloading zvggrl…-libxdg-basedir-1.2.0 (42KiB installed)...
 libxdg-basedir-1.2.0
 4.1MiB/s 00:00 | 13KiB transferred
 @ substituter-succeeded
 /gnu/store/zvggrli42q119zpqjd8ydxygvfj840bp-libxdg-basedir-1.2.0
 @ substituter-started
 /gnu/store/dplmx20hzggiin25pqrkx9z9irz9l7cn-awesome-3.4.15
 /gnu/store/04q37mcyxybzbc46j9c6pa3g8553sbgz-guix-0.10.0-0.97c8/libexec/guix/substitute

Found valid signature for
/gnu/store/dplmx20hzggiin25pqrkx9z9irz9l7cn-awesome-3.4.15
From
https://mirror.hydra.gnu.org/nar/dplmx20hzggiin25pqrkx9z9irz9l7cn-awesome-3.4.15
Downloading dplmx2…-awesome-3.4.15 (1.4MiB installed)...
 awesome-3.4.15
 264KiB/s 00:03 | 818KiB transferred
 @ substituter-succeeded
 /gnu/store/dplmx20hzggiin25pqrkx9z9irz9l7cn-awesome-3.4.15
 @ build-started
 /gnu/store/3g3l3i3j6d1zn9m0xjz8dgxnfphchjgp-awesome-3.4.15.drv -
 x86_64-linux
 /var/log/guix/drvs/3g//3l3i3j6d1zn9m0xjz8dgxnfphchjgp-awesome-3.4.15.drv.bz2
 grafting '/gnu/store/dplmx20hzggiin25pqrkx9z9irz9l7cn-awesome-3.4.15'
 -> '/gnu/store/hvnlf55aj3rkgkllp567k7jr8q04fyqb-awesome-3.4.15'...
 @ build-started
 /gnu/store/3g3l3i3j6d1zn9m0xjz8dgxnfphchjgp-awesome-3.4.15.drv -
 x86_64-linux
 /var/log/guix/drvs/3g//3l3i3j6d1zn9m0xjz8dgxnfphchjgp-awesome-3.4.15.drv.bz2
 grafting '/gnu/store/dplmx20hzggiin25pqrkx9z9irz9l7cn-awesome-3.4.15'
 -> '/gnu/store/hvnlf55aj3rkgkllp567k7jr8q04fyqb-awesome-3.4.15'...
 @ build-succeeded
 /gnu/store/3g3l3i3j6d1zn9m0xjz8dgxnfphchjgp-awesome-3.4.15.drv -
 /gnu/store/hvnlf55aj3rkgkllp567k7jr8q04fyqb-awesome-3.4.15
 ng0@shadowwalker ~$ guix build --check --rounds=2 awesome
 @ build-started
 /gnu/store/3g3l3i3j6d1zn9m0xjz8dgxnfphchjgp-awesome-3.4.15.drv -
 x86_64-linux
 /var/log/guix/drvs/3g//3l3i3j6d1zn9m0xjz8dgxnfphchjgp-awesome-3.4.15.drv.bz2
 grafting '/gnu/store/dplmx20hzggiin25pqrkx9z9irz9l7cn-awesome-3.4.15'
 -> '/gnu/store/hvnlf55aj3rkgkllp567k7jr8q04fyqb-awesome-3.4.15'...
 /gnu/store/hvnlf55aj3rkgkllp567k7jr8q04fyqb-awesome-3.4.15
Leo Famulari July 31, 2016, 10 p.m. UTC | #5
On Sun, Jul 31, 2016 at 09:45:29PM +0000, ng0 wrote:
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Fri, Jun 17, 2016 at 09:31:59AM +1000, Carlo Zancanaro wrote:
> >> On 16 June 2016 at 22:38, Ludovic Courtès <ludo@gnu.org> wrote:
> >> 
> >> > Primarily, I built it with --rounds=2 as per
> >> > <
> >> > https://www.gnu.org/software/guix/manual/html_node/Submitting-Patches.html>
> >> > ...
> >> >
> >> 
> >> I tried to build with --rounds=2, but always after I had built normally
> >> (because I cared first about whether it compiled, then later about whether
> >> it was deterministic). The --rounds=2 build never seemed to do anything. Is
> >> there something I have to do to make that work? (I tried adding the --check
> >> flag too, but it also seemed to not do anything, either with or without
> >> --rounds.)
> >
> > Once you have built the package and it is in /gnu/store, you need to use
> > --check.

Reading back, I realize that we didn't talk about grafting. --check
might not appear to have any effect if the package is grafted; in that
case, you'd need to add --no-grafts.
diff mbox

Patch

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 5f32fc4..7ee517c 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -7,6 +7,7 @@ 
 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Al McElrath <hello@yrns.org>
+;;; Copyright © 2016 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,7 @@ 
   #:use-module (guix packages)
   #:use-module (gnu packages)
   #:use-module (gnu packages linux)
+  #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
   #:use-module (gnu packages haskell)
@@ -49,6 +51,11 @@ 
   #:use-module (gnu packages maths)
   #:use-module (gnu packages web)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages gperf)
+  #:use-module (gnu packages imagemagick)
+  #:use-module (gnu packages lua)
   #:use-module (guix download)
   #:use-module (guix git-download))
 
@@ -370,3 +377,75 @@  and easy to handle yet full of features to make an easy and fast desktop
 experience.")
     (home-page "http://fluxbox.org/")
     (license license:expat)))
+
+(define-public awesome
+  (package
+    (name "awesome")
+    (version "3.4.15")
+    (source
+     (origin (method url-fetch)
+             (uri (string-append "https://awesome.naquadah.org/download/awesome-"
+                                 version ".tar.xz"))
+             (sha256
+              (base32
+               "1m910lr7wkw2dgzmirfvz7dasfswhhccdf65l21iiciv24c3w1bb"))))
+    (build-system cmake-build-system)
+    (native-inputs `(("asciidoc" ,asciidoc)
+                     ("docbook-xsl" ,docbook-xsl)
+                     ("doxygen" ,doxygen)
+                     ("gperf" ,gperf)
+                     ("imagemagick" ,imagemagick)
+                     ("libxml2" ,libxml2) ; for XML_CATALOG_FILES
+                     ("pkg-config" ,pkg-config)
+                     ("xmlto" ,xmlto)))
+    (inputs `(("cairo" ,cairo)
+              ("dbus" ,dbus)
+              ("gdk-pixbuf" ,gdk-pixbuf)
+              ("glib" ,glib)
+              ("imlib2" ,imlib2)
+              ("libev" ,libev)
+              ("libxcb" ,libxcb)
+              ("libxcursor" ,libxcursor)
+              ("libxdg-basedir" ,libxdg-basedir)
+              ("lua" ,lua-5.1)
+              ("pango" ,pango)
+              ("startup-notification" ,startup-notification)
+              ("xcb-util" ,xcb-util)
+              ("xcb-util-cursor" ,xcb-util-cursor)
+              ("xcb-util-image" ,xcb-util-image)
+              ("xcb-util-keysyms" ,xcb-util-keysyms)
+              ("xcb-util-renderutil" ,xcb-util-renderutil)
+              ("xcb-util-wm" ,xcb-util-wm)))
+    (arguments `(#:phases (modify-phases %standard-phases
+                            (add-before 'build 'xmlto-skip-validation
+                              (lambda _
+                                ;; we can't download the necessary schema, so
+                                ;; so skip validation and assume they're valid
+                                (substitute* "../build/CMakeFiles/man.dir/build.make"
+                                  (("/xmlto") (string-append "/xmlto --skip-validation")))
+                                #t))
+                            (replace 'check
+                              (lambda _
+                                ;; there aren't any tests, so just make sure the
+                                ;; binary gets built and can be run successfully
+                                (zero? (system* "../build/awesome" "-v")))))))
+    (synopsis "Highly configurable, next generation framework window manager
+for X")
+    (description
+     "awesome is a window manager for X.  It manages windows in different
+layouts, like floating or tiled.  Any layout can be applied dynamically,
+optimizing the environment for the application in use and the task currently
+being performed.
+
+In a tiled layout, windows are managed in a master and stacking area.  The
+master area contains the windows which currently need the most attention,
+whereas the stacking area contains all other windows.  In a floating layout
+windows can be resized and moved freely.  Dialog windows are always managed as
+floating, regardless of the layout currently applied.  The spiral and dwindle
+layouts are special cases of the tiled layout where the stacking area is
+arranged in a spiral for the former or as a rectangular fractal for the later.
+
+Windows are grouped by tags in awesome.  Each window can be tagged with one or
+more tags.  Selecting certain tags displays all windows with these tags.")
+    (license license:gpl2+)
+    (home-page "https://awesome.naquadah.org/")))