unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies.
@ 2015-08-18 20:40 Siniša Biđin
  2015-08-18 20:40 ` [PATCH 01/13] gnu: Add ghc-data-default-class Siniša Biđin
                   ` (12 more replies)
  0 siblings, 13 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

Hi,

I've attached packages for xmonad and xmonad-contrib, alongside a series of
their (direct or not) ghc-* dependencies. Most of the stuff went into
haskell.scm, but I've singled out xmonad{,-contrib} into their own module.

Any feedback appreciated.

Siniša Biđin (13):
  gnu: Add ghc-data-default-class.
  gnu: Add ghc-data-default-instances-base.
  gnu: Add ghc-data-default-instances-containers.
  gnu: Add ghc-data-default-instances-old-locale.
  gnu: Add ghc-dlist.
  gnu: Add ghc-extensible-exceptions.
  gnu: Add ghc-data-default-instances-dlist.
  gnu: Add ghc-utf8-string.
  gnu: Add ghc-data-default.
  gnu: Add ghc-x11.
  gnu: Add ghc-x11-xft.
  gnu: Add xmonad.
  gnu: Add ghc-xmonad-contrib.

 gnu-system.am            |   1 +
 gnu/packages/haskell.scm | 278 ++++++++++++++++++++++++++++++++++++++++++++++-
 gnu/packages/xmonad.scm  | 106 ++++++++++++++++++
 3 files changed, 383 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/xmonad.scm

--
2.4.3

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

* [PATCH 01/13] gnu: Add ghc-data-default-class.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-18 20:40 ` [PATCH 02/13] gnu: Add ghc-data-default-instances-base Siniša Biđin
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-data-default-class): New variable.
---
 gnu/packages/haskell.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index b7a889e..d0f74ad 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -270,6 +270,24 @@ Haskell software by automating the fetching, configuration, compilation and
 installation of Haskell libraries and programs.")
     (license bsd-3)))
 
+(define-public ghc-data-default-class
+  (package
+    (name "ghc-data-default-class")
+    (version "0.0.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/data-default-class/"
+              "data-default-class-" version ".tar.gz"))
+        (sha256
+          (base32 "0ccgr3jllinchqhw3lsn73ic6axk4196if5274rr1rghls0fxj5d"))))
+    (build-system haskell-build-system)
+    (home-page "http://hackage.haskell.org/package/data-default-class")
+    (synopsis "A class for types with a default value")
+    (description "Defines a class for types with a default values.")
+    (license bsd-3)))
+
 (define-public ghc-mtl
   (package
     (name "ghc-mtl")
-- 
2.4.3

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

* [PATCH 02/13] gnu: Add ghc-data-default-instances-base.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
  2015-08-18 20:40 ` [PATCH 01/13] gnu: Add ghc-data-default-class Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-18 20:40 ` [PATCH 03/13] gnu: Add ghc-data-default-instances-containers Siniša Biđin
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-data-default-instances-base): New variable.
---
 gnu/packages/haskell.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index d0f74ad..9ca8976 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -288,6 +288,29 @@ installation of Haskell libraries and programs.")
     (description "Defines a class for types with a default values.")
     (license bsd-3)))
 
+(define-public ghc-data-default-instances-base
+  (package
+    (name "ghc-data-default-instances-base")
+    (version "0.0.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/"
+              "data-default-instances-base/"
+              "data-default-instances-base-" version ".tar.gz"))
+        (sha256
+          (base32 "1832nq6by91f1iw73ycvkbgn8kpra83pvf2q61hy47xffh0zy4pb"))))
+    (build-system haskell-build-system)
+    (propagated-inputs
+      `(("ghc-data-default-class" ,ghc-data-default-class)))
+    (home-page
+      "http://hackage.haskell.org/package/data-default-instances-base")
+    (synopsis "Default instances for types in base")
+    (description "Provides Default instances for types from the base
+package.")
+    (license bsd-3)))
+
 (define-public ghc-mtl
   (package
     (name "ghc-mtl")
-- 
2.4.3

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

* [PATCH 03/13] gnu: Add ghc-data-default-instances-containers.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
  2015-08-18 20:40 ` [PATCH 01/13] gnu: Add ghc-data-default-class Siniša Biđin
  2015-08-18 20:40 ` [PATCH 02/13] gnu: Add ghc-data-default-instances-base Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-23 21:07   ` Eric Bavier
  2015-08-18 20:40 ` [PATCH 04/13] gnu: Add ghc-data-default-instances-old-locale Siniša Biđin
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-data-default-instances-containers):
  New variable.
---
 gnu/packages/haskell.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 9ca8976..e6bc25e 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -311,6 +311,29 @@ installation of Haskell libraries and programs.")
 package.")
     (license bsd-3)))
 
+(define-public ghc-data-default-instances-containers
+  (package
+    (name "ghc-data-default-instances-containers")
+    (version "0.0.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/"
+              "data-default-instances-containers/"
+              "data-default-instances-containers-" version ".tar.gz"))
+        (sha256
+          (base32 "06h8xka031w752a7cjlzghvr8adqbl95xj9z5zc1b62w02phfpm5"))))
+    (build-system haskell-build-system)
+    (inputs
+      `(("ghc-data-default-class" ,ghc-data-default-class)))
+    (home-page
+      "http://hackage.haskell.org/package/data-default-instances-containers")
+    (synopsis "Default instances for types in containers")
+    (description "Provides Default instances for types from the containers
+package.")
+    (license bsd-3)))
+
 (define-public ghc-mtl
   (package
     (name "ghc-mtl")
-- 
2.4.3

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

* [PATCH 04/13] gnu: Add ghc-data-default-instances-old-locale.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (2 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 03/13] gnu: Add ghc-data-default-instances-containers Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-18 20:40 ` [PATCH 05/13] gnu: Add ghc-dlist Siniša Biđin
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-data-default-instances-old-locale):
  New variable.
---
 gnu/packages/haskell.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index e6bc25e..8c05c47 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -334,6 +334,29 @@ package.")
 package.")
     (license bsd-3)))
 
+(define-public ghc-data-default-instances-old-locale
+  (package
+    (name "ghc-data-default-instances-old-locale")
+    (version "0.0.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/"
+              "data-default-instances-old-locale/"
+              "data-default-instances-old-locale-" version ".tar.gz"))
+        (sha256
+          (base32 "00h81i5phib741yj517p8mbnc48myvfj8axzsw44k34m48lv1lv0"))))
+    (build-system haskell-build-system)
+    (propagated-inputs
+      `(("ghc-data-default-class" ,ghc-data-default-class)))
+    (home-page
+      "http://hackage.haskell.org/package/data-default-instances-old-locale")
+    (synopsis "Default instances for types in old-locale")
+    (description "Provides Default instances for types from the old-locale
+  package.")
+    (license bsd-3)))
+
 (define-public ghc-mtl
   (package
     (name "ghc-mtl")
-- 
2.4.3

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

* [PATCH 05/13] gnu: Add ghc-dlist.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (3 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 04/13] gnu: Add ghc-data-default-instances-old-locale Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-18 20:40 ` [PATCH 06/13] gnu: Add ghc-extensible-exceptions Siniša Biđin
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-dlist): New variable.
---
 gnu/packages/haskell.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 8c05c47..2da5f7f 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -357,6 +357,29 @@ package.")
   package.")
     (license bsd-3)))
 
+(define-public ghc-dlist
+  (package
+    (name "ghc-dlist")
+    (version "0.7.1.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/dlist/dlist-"
+              version
+              ".tar.gz"))
+        (sha256
+          (base32 "1zayvxvkan2s2ixajdr3f5rn1gzhprzv6cww4cbpwjhzw0l7zc08"))))
+    (arguments `(#:tests? #f))
+    (build-system haskell-build-system)
+    (home-page "https://github.com/spl/dlist")
+    (synopsis "Difference lists")
+    (description
+      "Difference lists are a list-like type supporting O(1) append.  This is
+particularly useful for efficient logging and pretty printing (e.g. with the
+Writer monad), where list append quickly becomes too expensive.")
+    (license bsd-3)))
+
 (define-public ghc-mtl
   (package
     (name "ghc-mtl")
-- 
2.4.3

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

* [PATCH 06/13] gnu: Add ghc-extensible-exceptions.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (4 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 05/13] gnu: Add ghc-dlist Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-18 20:40 ` [PATCH 07/13] gnu: Add ghc-data-default-instances-dlist Siniša Biđin
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-extensible-exceptions): New variable.
---
 gnu/packages/haskell.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 2da5f7f..91860f2 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -380,6 +380,28 @@ particularly useful for efficient logging and pretty printing (e.g. with the
 Writer monad), where list append quickly becomes too expensive.")
     (license bsd-3)))
 
+(define-public ghc-extensible-exceptions
+  (package
+    (name "ghc-extensible-exceptions")
+    (version "0.1.1.4")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/"
+              "package/extensible-exceptions/"
+              "extensible-exceptions-" version ".tar.gz"))
+        (sha256
+          (base32 "1273nqws9ij1rp1bsq5jc7k2jxpqa0svawdbim05lf302y0firbc"))))
+    (build-system haskell-build-system)
+    (home-page
+      "http://hackage.haskell.org/package/extensible-exceptions")
+    (synopsis "Extensible exceptions")
+    (description
+      "This package provides extensible exceptions for both new and old
+versions of GHC (i.e., < 6.10).")
+    (license bsd-3)))
+
 (define-public ghc-mtl
   (package
     (name "ghc-mtl")
-- 
2.4.3

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

* [PATCH 07/13] gnu: Add ghc-data-default-instances-dlist.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (5 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 06/13] gnu: Add ghc-extensible-exceptions Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-23 21:09   ` Eric Bavier
  2015-08-18 20:40 ` [PATCH 08/13] gnu: Add ghc-utf8-string Siniša Biđin
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-data-default-instances-dlist):
  New variable.
---
 gnu/packages/haskell.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 91860f2..d7eba80 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -334,6 +334,30 @@ package.")
 package.")
     (license bsd-3)))
 
+(define-public ghc-data-default-instances-dlist
+  (package
+    (name "ghc-data-default-instances-dlist")
+    (version "0.0.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/"
+              "data-default-instances-dlist/"
+              "data-default-instances-dlist-" version ".tar.gz"))
+        (sha256
+          (base32 "0narkdqiprhgayjiawrr4390h4rq4pl2pb6mvixbv2phrc8kfs3x"))))
+    (build-system haskell-build-system)
+    (propagated-inputs
+     `(("ghc-data-default-class" ,ghc-data-default-class)
+       ("ghc-dlist" ,ghc-dlist)))
+    (home-page
+      "http://hackage.haskell.org/package/data-default-instances-dlist")
+    (synopsis "Default instances for types in dlist")
+    (description "Provides Default instances for types from the dlist
+package.")
+    (license bsd-3)))
+
 (define-public ghc-data-default-instances-old-locale
   (package
     (name "ghc-data-default-instances-old-locale")
-- 
2.4.3

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

* [PATCH 08/13] gnu: Add ghc-utf8-string.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (6 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 07/13] gnu: Add ghc-data-default-instances-dlist Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-18 20:40 ` [PATCH 09/13] gnu: Add ghc-data-default Siniša Biđin
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-utf8-string): New variable.
---
 gnu/packages/haskell.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index d7eba80..1e09ab3 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -476,6 +476,28 @@ http://web.cecs.pdx.edu/~mpj/pubs/springschool.html.")
      "Knowledge of GHC's installation directories.")
     (license bsd-3)))
 
+(define-public ghc-utf8-string
+  (package
+    (name "ghc-utf8-string")
+    (version "0.3.8")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/utf8-string/utf8-string-"
+              version
+              ".tar.gz"))
+        (sha256
+          (base32 "1h29dn0scsfkhmkg14ywq9178lw40ah1r36w249zfzqr02y7qxc0"))))
+    (build-system haskell-build-system)
+    (home-page "http://github.com/glguy/utf8-string/")
+    (synopsis "Support for reading and writing UTF8 Strings")
+    (description
+      "A UTF8 layer for Strings. The utf8-string package provides operations
+for encoding UTF8 strings to Word8 lists and back, and for reading and writing
+UTF8 without truncation.")
+    (license bsd-3)))
+
 (define-public ghc-zlib
   (package
     (name "ghc-zlib")
-- 
2.4.3

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

* [PATCH 09/13] gnu: Add ghc-data-default.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (7 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 08/13] gnu: Add ghc-utf8-string Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-18 20:40 ` [PATCH 10/13] gnu: Add ghc-x11 Siniša Biđin
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-data-default): New variable.
---
 gnu/packages/haskell.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 1e09ab3..4b011ff 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -270,6 +270,38 @@ Haskell software by automating the fetching, configuration, compilation and
 installation of Haskell libraries and programs.")
     (license bsd-3)))
 
+(define-public ghc-data-default
+  (package
+    (name "ghc-data-default")
+    (version "0.5.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/data-default/data-default-"
+              version
+              ".tar.gz"))
+        (sha256
+          (base32 "0d1hm0l9kim3kszshr4msmgzizrzha48gz2kb7b61p7n3gs70m7c"))))
+    (build-system haskell-build-system)
+    (propagated-inputs
+      `(("ghc-data-default-class"
+         ,ghc-data-default-class)
+        ("ghc-data-default-instances-base"
+         ,ghc-data-default-instances-base)
+        ("ghc-data-default-instances-containers"
+         ,ghc-data-default-instances-containers)
+        ("ghc-data-default-instances-dlist"
+         ,ghc-data-default-instances-dlist)
+        ("ghc-data-default-instances-old-locale"
+         ,ghc-data-default-instances-old-locale)))
+    (home-page "http://hackage.haskell.org/package/data-default")
+    (synopsis "A class for types with a default value")
+    (description "Defines a class for types with a default value, and provides
+instances for types from the base, containers, dlist and old-locale
+packages.")
+    (license bsd-3)))
+
 (define-public ghc-data-default-class
   (package
     (name "ghc-data-default-class")
-- 
2.4.3

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

* [PATCH 10/13] gnu: Add ghc-x11.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (8 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 09/13] gnu: Add ghc-data-default Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-23 21:11   ` Eric Bavier
  2015-08-18 20:40 ` [PATCH 11/13] gnu: Add ghc-x11-xft Siniša Biđin
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-x11): New variable.
---
 gnu/packages/haskell.scm | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 4b011ff..02ffd2a 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -33,7 +33,8 @@
   #:use-module (gnu packages libedit)
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages ncurses)
-  #:use-module (gnu packages python))
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages xorg))
 
 (define ghc-bootstrap-x86_64-7.8.4
   (origin
@@ -530,6 +531,38 @@ for encoding UTF8 strings to Word8 lists and back, and for reading and writing
 UTF8 without truncation.")
     (license bsd-3)))
 
+(define-public ghc-x11
+  (package
+    (name "ghc-x11")
+    (version "1.6.1.2")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/X11/X11-"
+              version
+              ".tar.gz"))
+        (sha256
+          (base32 "1kzjcynm3rr83ihqx2y2d852jc49da4p18gv6jzm7g87z22x85jj"))))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                 (add-before 'configure 'set-sh
+                  (lambda _ (setenv "CONFIG_SHELL" "sh"))))))
+    (build-system haskell-build-system)
+    (inputs
+     `(("libx11" ,libx11)
+       ("libxrandr" ,libxrandr)
+       ("libxinerama" ,libxinerama)
+       ("libxscrnsaver" ,libxscrnsaver)))
+    (propagated-inputs
+     `(("ghc-data-default" ,ghc-data-default)))
+    (home-page "https://github.com/haskell-pkg-janitors/X11")
+    (synopsis "A binding to the X11 graphics library")
+    (description
+      "A Haskell binding to the X11 graphics library. The binding is a direct
+translation of the C binding.")
+    (license bsd-3)))
+
 (define-public ghc-zlib
   (package
     (name "ghc-zlib")
-- 
2.4.3

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

* [PATCH 11/13] gnu: Add ghc-x11-xft.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (9 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 10/13] gnu: Add ghc-x11 Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-23 21:12   ` Eric Bavier
  2015-08-18 20:40 ` [PATCH 12/13] gnu: Add xmonad Siniša Biđin
  2015-08-18 20:40 ` [PATCH 13/13] gnu: Add ghc-xmonad-contrib Siniša Biđin
  12 siblings, 1 reply; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/haskell.scm (ghc-x11-xft): New variable.
---
 gnu/packages/haskell.scm | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
index 02ffd2a..0a9fa4f 100644
--- a/gnu/packages/haskell.scm
+++ b/gnu/packages/haskell.scm
@@ -18,12 +18,13 @@
 
 (define-module (gnu packages haskell)
   #:use-module (ice-9 regex)
-  #:use-module ((guix licenses) #:select (bsd-3))
+  #:use-module ((guix licenses) #:select (bsd-3 lgpl2.1))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system haskell)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages elf)
@@ -563,6 +564,36 @@ UTF8 without truncation.")
 translation of the C binding.")
     (license bsd-3)))
 
+(define-public ghc-x11-xft
+  (package
+    (name "ghc-x11-xft")
+    (version "0.3.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/X11-xft/X11-xft-"
+              version
+              ".tar.gz"))
+        (sha256
+          (base32 "1lgqb0s2qfwwgbvwxhjbi23rbwamzdi0l0slfr20c3jpcbp3zfjf"))))
+    (propagated-inputs
+     `(("ghc-x11" ,ghc-x11)
+       ("ghc-utf8-string" ,ghc-utf8-string)))
+    (inputs
+     `(("libx11" ,libx11)
+       ("libxft" ,libxft)
+       ("xproto" ,xproto)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (build-system haskell-build-system)
+    (home-page "http://hackage.haskell.org/package/X11-xft")
+    (synopsis "Bindings to Xft")
+    (description
+      "Bindings to the Xft, X Free Type interface library, and some Xrender
+parts.")
+    (license lgpl2.1)))
+
 (define-public ghc-zlib
   (package
     (name "ghc-zlib")
-- 
2.4.3

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

* [PATCH 12/13] gnu: Add xmonad.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (10 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 11/13] gnu: Add ghc-x11-xft Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  2015-08-23 20:47   ` Eric Bavier
  2015-08-18 20:40 ` [PATCH 13/13] gnu: Add ghc-xmonad-contrib Siniša Biđin
  12 siblings, 1 reply; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/xmonad.scm (xmonad, xmonad.desktop): New variables.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.
---
 gnu-system.am           |  1 +
 gnu/packages/xmonad.scm | 78 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)
 create mode 100644 gnu/packages/xmonad.scm

diff --git a/gnu-system.am b/gnu-system.am
index 9f46f7b..8148038 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -326,6 +326,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/xfig.scm				\
   gnu/packages/xiph.scm				\
   gnu/packages/xml.scm				\
+  gnu/packages/xmonad.scm			\
   gnu/packages/xnee.scm				\
   gnu/packages/xdisorg.scm			\
   gnu/packages/xorg.scm				\
diff --git a/gnu/packages/xmonad.scm b/gnu/packages/xmonad.scm
new file mode 100644
index 0000000..4d6a099
--- /dev/null
+++ b/gnu/packages/xmonad.scm
@@ -0,0 +1,78 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
+;;;
+;;; 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 xmonad)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix licenses)
+  #:use-module (guix build-system haskell)
+  #:use-module (gnu packages haskell))
+
+(define xmonad.desktop
+  (origin
+    (method url-fetch)
+    (uri (string-append
+          "https://sources.gentoo.org/cgi-bin/viewvc.cgi/"
+          "gentoo-x86/x11-wm/xmonad/files/xmonad.desktop?revision=1.3"))
+    (file-name "xmonad.desktop")
+    (sha256 (base32 "0jx3pqv62hjz0nnfxml2b3qiw2nzslwnva466xh28k23mpissj6s"))))
+
+(define-public xmonad
+  (package
+    (name "xmonad")
+    (version "0.11.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/xmonad/xmonad-"
+              version
+              ".tar.gz"))
+        (sha256
+         (base32 "1pfjssamiwpwjp1qqkm9m9p9s35pv381m0cwg6jxg0ppglibzq1r"))))
+    (build-system haskell-build-system)
+    (arguments
+     '(#:phases
+       (alist-cons-after
+        'install 'install-xsession
+        (lambda _
+            (let* ((file      (assoc-ref %build-inputs "xmonad.desktop"))
+                   (xsessions (string-append %output "/share/xsessions"))
+                   (target    (string-append xsessions "/xmonad.desktop")))
+              (mkdir-p xsessions)
+              (copy-file file target)))
+        %standard-phases)))
+    (inputs
+     `(("xmonad.desktop" ,xmonad.desktop)))
+    (propagated-inputs
+     `(("ghc-mtl" ,ghc-mtl)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
+       ("ghc-x11" ,ghc-x11)))
+    (home-page "http://xmonad.org")
+    (synopsis "A tiling window manager")
+    (description
+      "xmonad is a tiling window manager for X.  Windows are arranged
+automatically to tile the screen without gaps or overlap, maximising screen
+use.  All features of the window manager are accessible from the keyboard: a
+mouse is strictly optional.  xmonad is written and extensible in Haskell.
+ Custom layout algorithms, and other extensions, may be written by the user in
+config files.  Layouts are applied dynamically, and different layouts may be
+used on each workspace.  Xinerama is fully supported, allowing windows to be
+tiled on several screens.")
+    (license bsd-3)))
-- 
2.4.3

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

* [PATCH 13/13] gnu: Add ghc-xmonad-contrib.
  2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
                   ` (11 preceding siblings ...)
  2015-08-18 20:40 ` [PATCH 12/13] gnu: Add xmonad Siniša Biđin
@ 2015-08-18 20:40 ` Siniša Biđin
  12 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-08-18 20:40 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/xmonad.scm (ghc-xmonad-contrib): New variable.
---
 gnu/packages/xmonad.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/xmonad.scm b/gnu/packages/xmonad.scm
index 4d6a099..3a1c572 100644
--- a/gnu/packages/xmonad.scm
+++ b/gnu/packages/xmonad.scm
@@ -76,3 +76,31 @@ config files.  Layouts are applied dynamically, and different layouts may be
 used on each workspace.  Xinerama is fully supported, allowing windows to be
 tiled on several screens.")
     (license bsd-3)))
+
+(define-public ghc-xmonad-contrib
+  (package
+    (name "ghc-xmonad-contrib")
+    (version "0.11.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append
+              "http://hackage.haskell.org/package/xmonad-contrib/"
+              "xmonad-contrib-" version ".tar.gz"))
+        (sha256
+         (base32 "14h9vr33yljymswj50wbimav263y9abdcgi07mvfis0zd08rxqxa"))))
+    (build-system haskell-build-system)
+    (propagated-inputs
+     `(("ghc-mtl" ,ghc-mtl)
+       ("ghc-random" ,ghc-random)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
+       ("ghc-x11" ,ghc-x11)
+       ("ghc-x11-xft" ,ghc-x11-xft)
+       ("xmonad" ,xmonad)))
+    (home-page "http://xmonad.org")
+    (synopsis "Third party extensions for xmonad")
+    (description
+      "Third party tiling algorithms, configurations and scripts to xmonad, a
+tiling window manager for X.")
+    (license bsd-3)))
-- 
2.4.3

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

* Re: [PATCH 12/13] gnu: Add xmonad.
  2015-08-18 20:40 ` [PATCH 12/13] gnu: Add xmonad Siniša Biđin
@ 2015-08-23 20:47   ` Eric Bavier
  2015-08-24  3:00     ` Siniša Biđin
  0 siblings, 1 reply; 24+ messages in thread
From: Eric Bavier @ 2015-08-23 20:47 UTC (permalink / raw)
  To: Siniša Biđin; +Cc: guix-devel

On Tue, 18 Aug 2015 22:40:14 +0200
Siniša Biđin <sinisa@bidin.eu> wrote:

> * gnu/packages/xmonad.scm (xmonad, xmonad.desktop): New variables.
> * gnu-system.am (GNU_SYSTEM_MODULES): Add it.
> ---
>  gnu-system.am           |  1 +
>  gnu/packages/xmonad.scm | 78 +++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 79 insertions(+)
>  create mode 100644 gnu/packages/xmonad.scm
[...]
> +(define xmonad.desktop
> +  (origin
> +    (method url-fetch)
> +    (uri (string-append
> +          "https://sources.gentoo.org/cgi-bin/viewvc.cgi/"
> +          "gentoo-x86/x11-wm/xmonad/files/xmonad.desktop?revision=1.3"))
> +    (file-name "xmonad.desktop")
> +    (sha256 (base32 "0jx3pqv62hjz0nnfxml2b3qiw2nzslwnva466xh28k23mpissj6s"))))

I had to replace "Exec=/etc/X11/Session/xmonad" with "Exec=xmonad"
in this xmonad.desktop file in order to launch an xmonad session from
Slim.  Does this seem right?  Does it make sense to fetch this file
from gentoo.org and then modify it? or should we rather just generate it
ourselves?  What do you/others think?

> +
> +(define-public xmonad
> +  (package
> +    (name "xmonad")
> +    (version "0.11.1")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (string-append
> +              "http://hackage.haskell.org/package/xmonad/xmonad-"
> +              version
> +              ".tar.gz"))
> +        (sha256
> +         (base32 "1pfjssamiwpwjp1qqkm9m9p9s35pv381m0cwg6jxg0ppglibzq1r"))))
> +    (build-system haskell-build-system)
> +    (arguments
> +     '(#:phases
> +       (alist-cons-after
> +        'install 'install-xsession
> +        (lambda _
> +            (let* ((file      (assoc-ref %build-inputs "xmonad.desktop"))
> +                   (xsessions (string-append %output "/share/xsessions"))
> +                   (target    (string-append xsessions "/xmonad.desktop")))
> +              (mkdir-p xsessions)
> +              (copy-file file target)))
> +        %standard-phases)))
> +    (inputs
> +     `(("xmonad.desktop" ,xmonad.desktop)))
> +    (propagated-inputs
> +     `(("ghc-mtl" ,ghc-mtl)
> +       ("ghc-utf8-string" ,ghc-utf8-string)
> +       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
> +       ("ghc-x11" ,ghc-x11)))

Do these inputs need to be propagated?  I can start up an xmonad
session without propagating these inputs.  Do they need to be available
for xmonad's 'mod-q' (i.e. restarting xmonad/loading a new config)?

`~Eric

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

* Re: [PATCH 03/13] gnu: Add ghc-data-default-instances-containers.
  2015-08-18 20:40 ` [PATCH 03/13] gnu: Add ghc-data-default-instances-containers Siniša Biđin
@ 2015-08-23 21:07   ` Eric Bavier
  0 siblings, 0 replies; 24+ messages in thread
From: Eric Bavier @ 2015-08-23 21:07 UTC (permalink / raw)
  To: Siniša Biđin; +Cc: guix-devel

On Tue, 18 Aug 2015 22:40:05 +0200
Siniša Biđin <sinisa@bidin.eu> wrote:

> * gnu/packages/haskell.scm (ghc-data-default-instances-containers):
>   New variable.
> ---
>  gnu/packages/haskell.scm | 23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
[...]
> +    (inputs
> +      `(("ghc-data-default-class" ,ghc-data-default-class)))

I pushed this patch with this input propagated.

Thanks!
`~Eric

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

* Re: [PATCH 07/13] gnu: Add ghc-data-default-instances-dlist.
  2015-08-18 20:40 ` [PATCH 07/13] gnu: Add ghc-data-default-instances-dlist Siniša Biđin
@ 2015-08-23 21:09   ` Eric Bavier
  0 siblings, 0 replies; 24+ messages in thread
From: Eric Bavier @ 2015-08-23 21:09 UTC (permalink / raw)
  To: Siniša Biđin; +Cc: guix-devel

On Tue, 18 Aug 2015 22:40:09 +0200
Siniša Biđin <sinisa@bidin.eu> wrote:

> * gnu/packages/haskell.scm (ghc-data-default-instances-dlist):
>   New variable.
> ---
>  gnu/packages/haskell.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm
> index 91860f2..d7eba80 100644
> --- a/gnu/packages/haskell.scm
> +++ b/gnu/packages/haskell.scm
> @@ -334,6 +334,30 @@ package.")
>  package.")
>      (license bsd-3)))
>  
> +(define-public ghc-data-default-instances-dlist
> +  (package
> +    (name "ghc-data-default-instances-dlist")
> +    (version "0.0.1")
> +    (source
> +      (origin
        ^         
I pushed this patch with minor line alignment fixes.


> +        (method url-fetch)
> +        (uri (string-append
> +              "http://hackage.haskell.org/package/"
> +              "data-default-instances-dlist/"
> +              "data-default-instances-dlist-" version ".tar.gz"))
> +        (sha256
> +          (base32 "0narkdqiprhgayjiawrr4390h4rq4pl2pb6mvixbv2phrc8kfs3x"))))
> +    (build-system haskell-build-system)
> +    (propagated-inputs
> +     `(("ghc-data-default-class" ,ghc-data-default-class)
> +       ("ghc-dlist" ,ghc-dlist)))
> +    (home-page
> +      "http://hackage.haskell.org/package/data-default-instances-dlist")

I moved this to the same line as "home-page"

> +    (synopsis "Default instances for types in dlist")
> +    (description "Provides Default instances for types from the dlist
> +package.")
> +    (license bsd-3)))
> +
>  (define-public ghc-data-default-instances-old-locale
>    (package
>      (name "ghc-data-default-instances-old-locale")

Thanks,
`~Eric

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

* Re: [PATCH 10/13] gnu: Add ghc-x11.
  2015-08-18 20:40 ` [PATCH 10/13] gnu: Add ghc-x11 Siniša Biđin
@ 2015-08-23 21:11   ` Eric Bavier
  0 siblings, 0 replies; 24+ messages in thread
From: Eric Bavier @ 2015-08-23 21:11 UTC (permalink / raw)
  To: Siniša Biđin; +Cc: guix-devel

On Tue, 18 Aug 2015 22:40:12 +0200
Siniša Biđin <sinisa@bidin.eu> wrote:

> * gnu/packages/haskell.scm (ghc-x11): New variable.
> ---
>  gnu/packages/haskell.scm | 35 ++++++++++++++++++++++++++++++++++-
>  1 file changed, 34 insertions(+), 1 deletion(-)
[...]
> +    (source
> +      (origin

Align to under "s".

> +        (method url-fetch)
> +        (uri (string-append
> +              "http://hackage.haskell.org/package/X11/X11-"
> +              version
> +              ".tar.gz"))
> +        (sha256
> +          (base32 "1kzjcynm3rr83ihqx2y2d852jc49da4p18gv6jzm7g87z22x85jj"))))
> +    (arguments
> +     `(#:phases (modify-phases %standard-phases
> +                 (add-before 'configure 'set-sh
> +                  (lambda _ (setenv "CONFIG_SHELL" "sh"))))))

I modified this procedure to return #t.

Pushed with those changes.

Thank you,
`~Eric

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

* Re: [PATCH 11/13] gnu: Add ghc-x11-xft.
  2015-08-18 20:40 ` [PATCH 11/13] gnu: Add ghc-x11-xft Siniša Biđin
@ 2015-08-23 21:12   ` Eric Bavier
  0 siblings, 0 replies; 24+ messages in thread
From: Eric Bavier @ 2015-08-23 21:12 UTC (permalink / raw)
  To: Siniša Biđin; +Cc: guix-devel

I pushed this patch with similar alignment fixes.

Thanks
`~Eric

On Tue, 18 Aug 2015 22:40:13 +0200
Siniša Biđin <sinisa@bidin.eu> wrote:

> * gnu/packages/haskell.scm (ghc-x11-xft): New variable.
> ---
>  gnu/packages/haskell.scm | 33 ++++++++++++++++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)
> 
[...]
> +    (source
> +      (origin

Align to "s"

> +        (method url-fetch)
> +        (uri (string-append
> +              "http://hackage.haskell.org/package/X11-xft/X11-xft-"
> +              version
> +              ".tar.gz"))
> +        (sha256
> +          (base32 "1lgqb0s2qfwwgbvwxhjbi23rbwamzdi0l0slfr20c3jpcbp3zfjf"))))
> +    (propagated-inputs
> +     `(("ghc-x11" ,ghc-x11)
> +       ("ghc-utf8-string" ,ghc-utf8-string)))
> +    (inputs
> +     `(("libx11" ,libx11)
> +       ("libxft" ,libxft)
> +       ("xproto" ,xproto)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (build-system haskell-build-system)
> +    (home-page "http://hackage.haskell.org/package/X11-xft")
> +    (synopsis "Bindings to Xft")
> +    (description
> +      "Bindings to the Xft, X Free Type interface library, and some Xrender
> +parts.")

Align to "d".

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

* Re: [PATCH 12/13] gnu: Add xmonad.
  2015-08-23 20:47   ` Eric Bavier
@ 2015-08-24  3:00     ` Siniša Biđin
  2015-08-31 15:52       ` Ludovic Courtès
  0 siblings, 1 reply; 24+ messages in thread
From: Siniša Biđin @ 2015-08-24  3:00 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

On 2015-08-23 22:47, Eric Bavier wrote:
> I had to replace "Exec=/etc/X11/Session/xmonad" with "Exec=xmonad"
> in this xmonad.desktop file in order to launch an xmonad session from
> Slim.  Does this seem right?

Definitely!

I didn't test it thoroughly enough: I've been running xmonad via an
xsession file and managed to accidentally avoid the issue.

> Does it make sense to fetch this file
> from gentoo.org and then modify it? or should we rather just generate 
> it
> ourselves?  What do you/others think?

I had followed ratpoison's example (also using gentoo.org), but it does
feel dirty. I'm fine with generating it or having it stored in guix's 
repo,
but couldn't find an example of any other package doing the same.

>> +    (propagated-inputs
>> +     `(("ghc-mtl" ,ghc-mtl)
>> +       ("ghc-utf8-string" ,ghc-utf8-string)
>> +       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
>> +       ("ghc-x11" ,ghc-x11)))
> 
> Do these inputs need to be propagated?  I can start up an xmonad
> session without propagating these inputs.  Do they need to be available
> for xmonad's 'mod-q' (i.e. restarting xmonad/loading a new config)?

I think so, yes. For one, since xmonad is an executable and a library, 
if
we don't propagate, "ghc-pkg list" will report it as broken. Manually
calling "ghc --make" on xmonad.hs (or other modules using XMonad) will
fail, and I'm assuming mod-q will also (but I confess I haven't tested:
I felt avoiding a broken package in ghc's package database was enough of
a reason for propagating the dependencies).

Siniša

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

* Re: [PATCH 12/13] gnu: Add xmonad.
  2015-08-24  3:00     ` Siniša Biđin
@ 2015-08-31 15:52       ` Ludovic Courtès
  2015-08-31 22:02         ` Eric Bavier
  2015-09-11  8:38         ` Eric Bavier
  0 siblings, 2 replies; 24+ messages in thread
From: Ludovic Courtès @ 2015-08-31 15:52 UTC (permalink / raw)
  To: Siniša Biđin; +Cc: guix-devel

Siniša Biđin <sinisa@bidin.eu> skribis:

> On 2015-08-23 22:47, Eric Bavier wrote:
>> I had to replace "Exec=/etc/X11/Session/xmonad" with "Exec=xmonad"
>> in this xmonad.desktop file in order to launch an xmonad session from
>> Slim.  Does this seem right?
>
> Definitely!

[...]

>> Does it make sense to fetch this file
>> from gentoo.org and then modify it? or should we rather just
>> generate it
>> ourselves?  What do you/others think?
>
> I had followed ratpoison's example (also using gentoo.org), but it does
> feel dirty. I'm fine with generating it or having it stored in guix's
> repo,
> but couldn't find an example of any other package doing the same.

I think “generating” it (or having it as a string literal) in the source
is preferable.

>>> +    (propagated-inputs
>>> +     `(("ghc-mtl" ,ghc-mtl)
>>> +       ("ghc-utf8-string" ,ghc-utf8-string)
>>> +       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
>>> +       ("ghc-x11" ,ghc-x11)))
>>
>> Do these inputs need to be propagated?  I can start up an xmonad
>> session without propagating these inputs.  Do they need to be available
>> for xmonad's 'mod-q' (i.e. restarting xmonad/loading a new config)?
>
> I think so, yes. For one, since xmonad is an executable and a library,
> if
> we don't propagate, "ghc-pkg list" will report it as broken.

Makes sense to me.

Could you post an updated patch that addresses these two things?

TIA, and sorry for the delay!

Ludo’.

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

* Re: [PATCH 12/13] gnu: Add xmonad.
  2015-08-31 15:52       ` Ludovic Courtès
@ 2015-08-31 22:02         ` Eric Bavier
  2015-09-11  8:38         ` Eric Bavier
  1 sibling, 0 replies; 24+ messages in thread
From: Eric Bavier @ 2015-08-31 22:02 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

On Mon, 31 Aug 2015 17:52:36 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Siniša Biđin <sinisa@bidin.eu> skribis:
> 
> > On 2015-08-23 22:47, Eric Bavier wrote:
> >> I had to replace "Exec=/etc/X11/Session/xmonad" with "Exec=xmonad"
> >> in this xmonad.desktop file in order to launch an xmonad session from
> >> Slim.  Does this seem right?
> >
> > Definitely!
> 
> [...]
> 
> >> Does it make sense to fetch this file
> >> from gentoo.org and then modify it? or should we rather just
> >> generate it
> >> ourselves?  What do you/others think?
> >
> > I had followed ratpoison's example (also using gentoo.org), but it does
> > feel dirty. I'm fine with generating it or having it stored in guix's
> > repo,
> > but couldn't find an example of any other package doing the same.
> 
> I think “generating” it (or having it as a string literal) in the source
> is preferable.
> 
> >>> +    (propagated-inputs
> >>> +     `(("ghc-mtl" ,ghc-mtl)
> >>> +       ("ghc-utf8-string" ,ghc-utf8-string)
> >>> +       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
> >>> +       ("ghc-x11" ,ghc-x11)))
> >>
> >> Do these inputs need to be propagated?  I can start up an xmonad
> >> session without propagating these inputs.  Do they need to be available
> >> for xmonad's 'mod-q' (i.e. restarting xmonad/loading a new config)?
> >
> > I think so, yes. For one, since xmonad is an executable and a library,
> > if
> > we don't propagate, "ghc-pkg list" will report it as broken.
> 
> Makes sense to me.
> 
> Could you post an updated patch that addresses these two things?

BTW, attached is the current state of the patch that I have.  It
addresses the first item here (installing the xsession file).

For the second, I was toying with the idea of wrapping the xmonad
executable to provide both the ghc binary and the needed modules
(transitive propagated inputs, similar in style to what's done with
git-email currently, and for which I have an outstanding patch).  The
intent, IMO, would be to support xmonad's "reconfiguration".  I've not
used xmonad much before, but this appears to involve basically a
rebuild of the xmonad binary.  I'm not sure that just propagating the
input modules would be enough to support this.  It's also somewhat
unfortunate that the build would happen in a relatively polluted
environment.  Anyhow, sharing my current patch in case anyone else
wanted to play with it.

`~Eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-xmonad.patch --]
[-- Type: text/x-patch, Size: 5279 bytes --]

From c916b7849d0b866c64258443fea1909e4785d961 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sini=C5=A1a=20Bi=C4=91in?= <sinisa@bidin.eu>
Date: Tue, 18 Aug 2015 22:40:14 +0200
Subject: [PATCH 1/2] gnu: Add xmonad.

* gnu/packages/xmonad.scm (xmonad): New variable.
* gnu-system.am (GNU_SYSTEM_MODULES): Add it.

Signed-off-by: Eric Bavier <bavier@member.fsf.org>
---
 gnu-system.am           |  1 +
 gnu/packages/xmonad.scm | 94 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 95 insertions(+)
 create mode 100644 gnu/packages/xmonad.scm

diff --git a/gnu-system.am b/gnu-system.am
index 130ae36..4c34da3 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -330,6 +330,7 @@ GNU_SYSTEM_MODULES =				\
   gnu/packages/xfig.scm				\
   gnu/packages/xiph.scm				\
   gnu/packages/xml.scm				\
+  gnu/packages/xmonad.scm			\
   gnu/packages/xnee.scm				\
   gnu/packages/xdisorg.scm			\
   gnu/packages/xorg.scm				\
diff --git a/gnu/packages/xmonad.scm b/gnu/packages/xmonad.scm
new file mode 100644
index 0000000..01828c9
--- /dev/null
+++ b/gnu/packages/xmonad.scm
@@ -0,0 +1,94 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2015 Siniša Biđin <sinisa@bidin.eu>
+;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
+;;;
+;;; 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 xmonad)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix licenses)
+  #:use-module (guix build-system haskell)
+  #:use-module (gnu packages haskell))
+
+(define-public xmonad
+  (package
+    (name "xmonad")
+    (version "0.11.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "http://hackage.haskell.org/package/xmonad/xmonad-"
+             version
+             ".tar.gz"))
+       (sha256
+        (base32 "1pfjssamiwpwjp1qqkm9m9p9s35pv381m0cwg6jxg0ppglibzq1r"))))
+    (build-system haskell-build-system)
+    (home-page "http://xmonad.org")
+    (synopsis "Tiling window manager")
+    (arguments
+     `(#:imported-modules ((srfi srfi-26)
+                           ,@%haskell-build-system-modules)
+       #:phases
+       (modify-phases %standard-phases
+         (add-after
+          'install 'install-xsession
+          (lambda _
+            (let* ((xsessions (string-append %output "/share/xsessions")))
+              (mkdir-p xsessions)
+              (call-with-output-file
+                  (string-append xsessions "/xmonad.desktop")
+                (lambda (port)
+                  (format port "~
+                    [Desktop Entry]~@
+                    Name=~a~@
+                    Comment=~a~@
+                    Exec=~a/bin/xmonad~@
+                    Type=Application~%" ,name ,synopsis %output))))))
+         (add-after
+          'install 'wrap-program
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            ;; Xmonad needs 'ghc' in PATH in order for reconfiguration to
+            ;; work.  This means that the ghc inputs also need to be
+            ;; available.
+            (wrap-program (string-append (assoc-ref outputs "out") "/bin/xmonad")
+              `("PATH" ":" prefix
+                (,(string-append (assoc-ref inputs "haskell") "/bin")))
+              ;; `("GHC_PACKAGE_PATH" ":" prefix
+              ;;   (,@(map (cut string-append <> "/lib")
+              ;;           `(,out
+              ;;             ,@(map (cut assoc-ref inputs <>)
+              ;;                    '("ghc-mtl" "ghc-utf8-string"
+              ;;                      "ghc-extensible-exceptions"
+              ;;                      "ghc-x11"))))))
+              )
+            )))))
+    (propagated-inputs
+     `(("ghc-mtl" ,ghc-mtl)
+       ("ghc-utf8-string" ,ghc-utf8-string)
+       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
+       ("ghc-x11" ,ghc-x11)))
+    (description
+     "Xmonad is a tiling window manager for X.  Windows are arranged
+automatically to tile the screen without gaps or overlap, maximising screen
+use.  All features of the window manager are accessible from the keyboard: a
+mouse is strictly optional.  Xmonad is written and extensible in Haskell.
+Custom layout algorithms, and other extensions, may be written by the user in
+config files.  Layouts are applied dynamically, and different layouts may be
+used on each workspace.  Xinerama is fully supported, allowing windows to be
+tiled on several screens.")
+    (license bsd-3)))
-- 
2.4.3


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

* Re: [PATCH 12/13] gnu: Add xmonad.
  2015-08-31 15:52       ` Ludovic Courtès
  2015-08-31 22:02         ` Eric Bavier
@ 2015-09-11  8:38         ` Eric Bavier
  2015-09-12 14:05           ` Siniša Biđin
  1 sibling, 1 reply; 24+ messages in thread
From: Eric Bavier @ 2015-09-11  8:38 UTC (permalink / raw)
  To: Ludovic Courtès, Siniša Biđin; +Cc: guix-devel

On Mon, 31 Aug 2015 17:52:36 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Siniša Biđin <sinisa@bidin.eu> skribis:
> 
> > On 2015-08-23 22:47, Eric Bavier wrote:
> >> I had to replace "Exec=/etc/X11/Session/xmonad" with "Exec=xmonad"
> >> in this xmonad.desktop file in order to launch an xmonad session from
> >> Slim.  Does this seem right?
> >
> > Definitely!
> 
> [...]
> 
> >> Does it make sense to fetch this file
> >> from gentoo.org and then modify it? or should we rather just
> >> generate it
> >> ourselves?  What do you/others think?
> >
> > I had followed ratpoison's example (also using gentoo.org), but it does
> > feel dirty. I'm fine with generating it or having it stored in guix's
> > repo,
> > but couldn't find an example of any other package doing the same.
> 
> I think “generating” it (or having it as a string literal) in the source
> is preferable.
> 
> >>> +    (propagated-inputs
> >>> +     `(("ghc-mtl" ,ghc-mtl)
> >>> +       ("ghc-utf8-string" ,ghc-utf8-string)
> >>> +       ("ghc-extensible-exceptions" ,ghc-extensible-exceptions)
> >>> +       ("ghc-x11" ,ghc-x11)))
> >>
> >> Do these inputs need to be propagated?  I can start up an xmonad
> >> session without propagating these inputs.  Do they need to be available
> >> for xmonad's 'mod-q' (i.e. restarting xmonad/loading a new config)?
> >
> > I think so, yes. For one, since xmonad is an executable and a library,
> > if
> > we don't propagate, "ghc-pkg list" will report it as broken.
> 
> Makes sense to me.
> 
> Could you post an updated patch that addresses these two things?

I've pushed a modified commit that generates the .desktop files for
xmonad, and adds the package instead to gnu/packages/wm.scm.

This Xmonad's mod-q does not work as expected, but that isn't a problem
if you like the default configuration ;).  Anyhow, some more work will
need to be done to support reconfiguration.  I had thought
GHC_PACKAGE_PATH would do what we need, but it doesn't seem to do what
I had thought.  Perhaps creating a custom package database for xmonad
to use would work.

Thanks again for the patch, and sorry for the delay in getting it
pushed!
`~Eric

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

* Re: [PATCH 12/13] gnu: Add xmonad.
  2015-09-11  8:38         ` Eric Bavier
@ 2015-09-12 14:05           ` Siniša Biđin
  0 siblings, 0 replies; 24+ messages in thread
From: Siniša Biđin @ 2015-09-12 14:05 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

On 2015-09-11 10:38, Eric Bavier wrote:
> I've pushed a modified commit that generates the .desktop files for
> xmonad, and adds the package instead to gnu/packages/wm.scm.

Great!

> This Xmonad's mod-q does not work as expected, but that isn't a problem
> if you like the default configuration ;).  Anyhow, some more work will
> need to be done to support reconfiguration.  I had thought
> GHC_PACKAGE_PATH would do what we need, but it doesn't seem to do what
> I had thought.  Perhaps creating a custom package database for xmonad
> to use would work.

I believe mod-q works fine for me with the following set:

     profile=$HOME/.guix-profile
     export GHC_PACKAGE_PATH=$profile/lib/ghc-7.8.4/package.conf.d/:

Note the trailing colon. (I haven't yet tried this out with the new
version you just pushed, so it's very possible this doesn't help.)

About creating custom package databases: my xmonad.hs imports packages
other than xmonad and xmonad-contrib, so my GHC_PACKAGE_PATH would in
that case still need to contain the $profile's package database.

Siniša

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

end of thread, other threads:[~2015-09-12 14:05 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-18 20:40 [PATCH 00/13] Add xmonad, xmonad-contrib and dependencies Siniša Biđin
2015-08-18 20:40 ` [PATCH 01/13] gnu: Add ghc-data-default-class Siniša Biđin
2015-08-18 20:40 ` [PATCH 02/13] gnu: Add ghc-data-default-instances-base Siniša Biđin
2015-08-18 20:40 ` [PATCH 03/13] gnu: Add ghc-data-default-instances-containers Siniša Biđin
2015-08-23 21:07   ` Eric Bavier
2015-08-18 20:40 ` [PATCH 04/13] gnu: Add ghc-data-default-instances-old-locale Siniša Biđin
2015-08-18 20:40 ` [PATCH 05/13] gnu: Add ghc-dlist Siniša Biđin
2015-08-18 20:40 ` [PATCH 06/13] gnu: Add ghc-extensible-exceptions Siniša Biđin
2015-08-18 20:40 ` [PATCH 07/13] gnu: Add ghc-data-default-instances-dlist Siniša Biđin
2015-08-23 21:09   ` Eric Bavier
2015-08-18 20:40 ` [PATCH 08/13] gnu: Add ghc-utf8-string Siniša Biđin
2015-08-18 20:40 ` [PATCH 09/13] gnu: Add ghc-data-default Siniša Biđin
2015-08-18 20:40 ` [PATCH 10/13] gnu: Add ghc-x11 Siniša Biđin
2015-08-23 21:11   ` Eric Bavier
2015-08-18 20:40 ` [PATCH 11/13] gnu: Add ghc-x11-xft Siniša Biđin
2015-08-23 21:12   ` Eric Bavier
2015-08-18 20:40 ` [PATCH 12/13] gnu: Add xmonad Siniša Biđin
2015-08-23 20:47   ` Eric Bavier
2015-08-24  3:00     ` Siniša Biđin
2015-08-31 15:52       ` Ludovic Courtès
2015-08-31 22:02         ` Eric Bavier
2015-09-11  8:38         ` Eric Bavier
2015-09-12 14:05           ` Siniša Biđin
2015-08-18 20:40 ` [PATCH 13/13] gnu: Add ghc-xmonad-contrib Siniša Biđin

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