[PATCH 07/12] gnu: ncurses: support mingw.

2016-08-17 Thread Jan Nieuwenhuizen
From: Mark H Weaver 

* gnu/packages/patches/ncurses-mingw.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/ncurses.scm (ncurses): Support MinGW.

Co-Authored-By: Jan Nieuwenhuizen 
---
 gnu/packages/ncurses.scm | 234 ++-
 1 file changed, 132 insertions(+), 102 deletions(-)

diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 147033a..4d26fde 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -1,7 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès 
-;;; Copyright © 2014 Mark H Weaver 
+;;; Copyright © 2014, 2016 Mark H Weaver 
 ;;; Copyright © 2015 Leo Famulari 
+;;; Copyright © 2016 Jan Nieuwenhuizen 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -19,124 +20,153 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (gnu packages ncurses)
+  #:use-module (gnu packages)
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu))
 
 (define-public ncurses
-  (let ((patch-makefile-phase
- '(lambda _
-(for-each patch-makefile-SHELL
-  (find-files "." "Makefile.in"
-(configure-phase
- ;; The 'configure' script does not understand '--docdir', so we must
- ;; override that and use '--mandir' instead.
- '(lambda* (#:key build target outputs configure-flags
-#:allow-other-keys)
-(let ((out (assoc-ref outputs "out"))
-  (doc (assoc-ref outputs "doc")))
-  (zero? (apply system* "./configure"
-(string-append "SHELL=" (which "sh"))
-(string-append "--build=" build)
-(string-append "--prefix=" out)
-(string-append "--mandir=" doc "/share/man")
-(if target
-(cons (string-append "--host=" target)
-  configure-flags)
-configure-flags))
-(remove-shebang-phase
- '(lambda _
-;; To avoid retaining a reference to the bootstrap Bash via the
-;; shebang of the 'ncursesw6-config' script, simply remove that
-;; shebang: it'll work just as well without it.  Likewise, do not
-;; retain a reference to the "doc" output.
-(substitute* "misc/ncurses-config.in"
-  (("#!@SHELL@")
-   "# No shebang here, use /bin/sh!\n")
-  (("@SHELL@ \\$0")
-   "$0")
-  (("mandir=.*$")
-   "mandir=share/man"))
-#t))
-(post-install-phase
- '(lambda* (#:key outputs #:allow-other-keys)
-(let ((out (assoc-ref outputs "out")))
-  ;; When building a wide-character (Unicode) build, create 
backward
-  ;; compatibility links from the the "normal" libraries to the
-  ;; wide-character libraries (e.g. libncurses.so to 
libncursesw.so).
-  (with-directory-excursion (string-append out "/lib")
-(for-each (lambda (lib)
-(define libw.a
-  (string-append "lib" lib "w.a"))
-(define lib.a
-  (string-append "lib" lib ".a"))
-(define libw.so.x
-  (string-append "lib" lib "w.so.6"))
-(define lib.so.x
-  (string-append "lib" lib ".so.6"))
-(define lib.so
-  (string-append "lib" lib ".so"))
-
-(when (file-exists? libw.a)
-  (format #t "creating symlinks for `lib~a'~%" lib)
-  (symlink libw.a lib.a)
-  (symlink libw.so.x lib.so.x)
-  (false-if-exception (delete-file lib.so))
-  (call-with-output-file lib.so
-(lambda (p)
-  (format p "INPUT (-l~aw)~%" lib)
-  '("curses" "ncurses" "form" "panel" "menu")))
-(package
- (name "ncurses")
- (version "6.0")
- (source (origin
+  (package
+(name "ncurses")
+(version "6.0")
+(source (origin
   (method url-fetch)
   (uri (string-append "mirror://gnu/ncurses/ncurses-"
   version ".tar.gz"))
   (sha256
(base32
-"0q3jck7lna77z5r42f13c4xglc7azd19pxfrjrpgp2yf615w4lgm"
- (build-system gnu-build-system)
- (outputs '("out"
-   

[PATCH 01/12] gnu: Add gcc-cross-x86_64 packages for testing.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/cross-base.scm: (xgcc-sans-libc-x86_64-linux-gnu,
xgcc-x86_64-linux-gnu): New variables.
---
 gnu/packages/cross-base.scm | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 3bd30fd..cb53668 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -402,3 +402,14 @@ XBINUTILS and the cross tool chain."
 ;; (cross-gcc triplet
 ;;(cross-binutils triplet)
 ;;(cross-libc triplet
+
+(define-public xgcc-sans-libc-x86_64-linux-gnu
+  (let ((triplet "x86_64-linux-gnu"))
+(cross-gcc triplet
+   (cross-binutils triplet
+
+(define-public xgcc-x86_64-linux-gnu
+  (let ((triplet "x86_64-linux-gnu"))
+(cross-gcc triplet
+   (cross-binutils triplet)
+   (cross-libc triplet
-- 
2.9.2




[PATCH 10/12] gnu: ncurses: build mingw with libtool.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/ncurses.scm (ncurses)[MINGW]: Build with libtool, as
recommended; enables dlopen'ing.
---
 gnu/packages/ncurses.scm | 33 +
 1 file changed, 25 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index 4d26fde..74a8470 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -27,6 +27,11 @@
   #:use-module (guix utils)
   #:use-module (guix build-system gnu))
 
+(define* (cross-libtool #:optional (target (%current-target-system)))
+  (let* ((libtool (resolve-interface '(gnu packages cross-base)))
+ (cross-libtool (module-ref libtool 'cross-libtool)))
+`(("xlibtool" ,(cross-libtool target)
+
 (define-public ncurses
   (package
 (name "ncurses")
@@ -41,6 +46,9 @@
   (patches (if (target-mingw?)
(search-patches "ncurses-mingw.patch")
'()
+(native-inputs `(,@(if (target-mingw?)
+   `(,@(cross-libtool))
+   '(
 (build-system gnu-build-system)
 (outputs '("out"
"doc"));1 MiB of man pages
@@ -92,12 +100,12 @@
 (lambda (lib)
   (define lib.dll
 (string-append "lib" lib ".dll"))
-  (define libw6.dll
-(string-append "lib" lib "w6.dll"))
+  (define libw-6.dll
+(string-append "lib" lib "w-6.dll"))
 
-  (when (file-exists? libw6.dll)
+  (when (file-exists? libw-6.dll)
 (format #t "creating symlinks for `lib~a'~%" 
lib)
-(symlink libw6.dll lib.dll)))
+(symlink libw-6.dll lib.dll)))
 '("curses" "ncurses" "form" "panel" "menu"
'())
  (with-directory-excursion (string-append out "/lib")
@@ -114,7 +122,10 @@
  (string-append "lib" lib ".so.6"))
(define lib.so
  (string-append "lib" lib ".so")))
- '())
+ '((define libw.la
+ (string-append "lib" lib "w.la"))
+   (define lib.la
+ (string-append "lib" lib ".la"
 
(when (file-exists? libw.a)
  (format #t "creating symlinks for `lib~a'~%" 
lib)
@@ -125,7 +136,13 @@
  (call-with-output-file lib.so
(lambda (p)
  (format p "INPUT (-l~aw)~%" 
lib
-   '(
+   '()))
+
+   ,@(if (target-mingw?)
+ '((when (file-exists? libw.la)
+ (format #t "creating symlinks for 
`lib~a'~%" lib)
+ (symlink libw.la lib.la)))
+ '()))
  '("curses" "ncurses" "form" "panel" "menu")))
`(#:configure-flags
  ,(cons*
@@ -142,8 +159,8 @@
   ;; correct RUNPATH.
   ,(list 'unquote '(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref 
%outputs "out")
   "/lib"))
-  ;; MinGW: Use term-driver created for the MinGW port.
-  ,@(if (target-mingw?) '("--enable-term-driver") '()
+  ;; MinGW: Use term-driver created for the MinGW port, libtool.
+  ,@(if (target-mingw?) '("--enable-term-driver" "--with-libtool") 
'()
  #:tests? #f  ; no "check" target
  #:phases (modify-phases %standard-phases
 (replace 'configure ,configure-phase)
-- 
2.9.2




[PATCH 12/12] gnu: guile-2.0: support mingw.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/guile.scm (guile-2.0): Support MinGW.
---
 gnu/packages/guile.scm | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index f26cc22..ee84c05 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -143,8 +143,8 @@ without requiring the source code to be rewritten.")
(native-inputs `(("pkgconfig" ,pkg-config)))
(inputs `(("libffi" ,libffi)
  ("readline" ,readline)
- ("bash" ,bash)))
-
+ ,@(libiconv-if-needed)
+ ,@(if (target-mingw?) '() `(("bash" ,bash)
(propagated-inputs
 `( ;; These ones aren't normally needed here, but since `libguile-2.0.la'
;; reads `-lltdl -lunistring', adding them here will add the needed
@@ -173,8 +173,15 @@ without requiring the source code to be rewritten.")
   ;; Tell (ice-9 popen) the file name of Bash.
   (let ((bash (assoc-ref inputs "bash")))
 (substitute* "module/ice-9/popen.scm"
+  ;; If bash is #f allow fallback for user to provide
+  ;; "bash" in PATH.  This happens when cross-building to
+  ;; MinGW for which we do not have Bash yet.
   (("/bin/sh")
-   (string-append bash "/bin/bash")
+   ,@(if (target-mingw?)
+ '((if bash
+   (string-append bash "/bin/bash")
+   "bash"))
+ '((string-append bash "/bin/bash")))
 %standard-phases)))
 
(native-search-paths
-- 
2.9.2




[PATCH 03/12] gnu: cross-build: i686-w64-mingw32: new cross target.

2016-08-17 Thread Jan Nieuwenhuizen
* guix/utils.scm (mingw-target?): New function.
* gnu/packages/cross-base.scm (cross-gcc-snippet): New function for MinGW.
(cross-gcc): Use it.
(cross-gcc-arguments, cross-gcc-patches, cross-gcc): Support MinGW.
(native-libc, cross-newlib?): New functions.
(cross-libc): Use cross-newlib? to support MinGW.
(xbinutils-i686-w64-mingw32, xgcc-sans-libc-i686-w64-mingw32,
xgcc-i686-w64-mingw32): New variables.
---
 gnu/packages/cross-base.scm | 350 +---
 guix/utils.scm  |   5 +
 2 files changed, 239 insertions(+), 116 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index cb53668..996e392 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -19,12 +19,12 @@
 ;;; along with GNU Guix.  If not, see .
 
 (define-module (gnu packages cross-base)
-  #:use-module (guix licenses)
   #:use-module (gnu packages)
-  #:use-module (gnu packages gcc)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages mingw)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix utils)
@@ -35,13 +35,23 @@
   #:use-module (ice-9 match)
   #:export (cross-binutils
 cross-libc
-cross-gcc))
+cross-gcc
+cross-newlib?))
 
 (define %xgcc
   ;; GCC package used as the basis for cross-compilation.  It doesn't have to
   ;; be 'gcc' and can be a specific variant such as 'gcc-4.8'.
   gcc)
 
+(define %gcc-include-paths
+  '("C_INCLUDE_PATH"
+"CPLUS_INCLUDE_PATH"
+"OBJC_INCLUDE_PATH"
+"OBJCPLUS_INCLUDE_PATH"))
+
+(define %gcc-cross-include-paths
+  (map (cut string-append "CROSS_" <>) %gcc-include-paths))
+
 (define (cross p target)
   (package (inherit p)
 (name (string-append (package-name p) "-cross-" target))
@@ -129,7 +139,12 @@ may be either a libc package or #f.)"
"--disable-libitm"
"--disable-libvtv"
"--disable-libsanitizer"
-   )))
+))
+
+   ;; For a newlib (non-glibc) target
+   ,@(if (cross-newlib? target)
+ '("--with-newlib")
+ '()))
 
  ,(if libc
   flags
@@ -171,12 +186,82 @@ may be either a libc package or #f.)"
 ;; for cross-compilers.
 (zero? (system* "make" "install-strip")))
   ,phases
-  (if libc
+   (cond
+((target-mingw? target)
+ `(modify-phases ,phases
+(add-before
+ 'configure 'set-cross-path
+ (lambda* (#:key inputs #:allow-other-keys)
+   ;; Add the cross mingw headers to CROSS_C_*_INCLUDE_PATH,
+   ;; and remove them from C_*INCLUDE_PATH.
+   (let ((libc (assoc-ref inputs "libc"))
+ (gcc (assoc-ref inputs "gcc")))
+ (define (cross? x)
+   (and libc (string-prefix? libc x)))
+ (define (unpacked-mingw-dir)
+   (match
+   (scandir
+"."
+(lambda (name) (string-contains name "mingw-w64")))
+ ((mingw-dir)
+  (string-append
+   (getcwd) "/" mingw-dir "/mingw-w64-headers"
+ (if libc
+ (let ((cpath (string-append
+   libc "/include"
+   ":" libc "/i686-w64-mingw32/include")))
+   (for-each (cut setenv <> cpath)
+ ',%gcc-cross-include-paths))
+ ;; libc is false, so we are building xgcc-sans-libc
+ ;; Add essential headers from mingw-w64.
+ (let ((mingw-source (assoc-ref inputs 
"mingw-source")))
+   (system* "tar" "xf" mingw-source)
+   (let ((mingw-headers (unpacked-mingw-dir)))
+ ;; We need _mingw.h which will gets built from
+ ;; _mingw.h.in by mingw-w64's configure.  We
+ ;; cannot configure mingw-w64 until we have
+ ;; xgcc-sans-libc; substitute to the rescue.
+ (copy-file (string-append mingw-headers
+   "/crt/_mingw.h.in")
+(string-append mingw-headers
+   "/crt/_mingw.h

[PATCH 09/12] gnu: libtool: support cross-libtool mingw.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/patches/libtool-mingw.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/autotools.scm (libtool): Support cross-libtool for MinGW.
---
 gnu/packages/autotools.scm   |  3 ++-
 gnu/packages/patches/libtool-mingw.patch | 28 
 2 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/libtool-mingw.patch

diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 21ed0e6..f6706ca 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -295,7 +295,8 @@ Makefile, simplifying the entire process for the 
developer.")
   (sha256
(base32
 "0vxj52zm709125gwv9qqlw02silj8bnjnh4y07arrz60r31ai1vw"))
-  (patches (search-patches "libtool-skip-tests2.patch"
+  (patches (search-patches "libtool-skip-tests2.patch"
+   "libtool-mingw.patch"
 (build-system gnu-build-system)
 (propagated-inputs `(("m4" ,m4)))
 (native-inputs `(("m4" ,m4)
diff --git a/gnu/packages/patches/libtool-mingw.patch 
b/gnu/packages/patches/libtool-mingw.patch
new file mode 100644
index 000..d406f63
--- /dev/null
+++ b/gnu/packages/patches/libtool-mingw.patch
@@ -0,0 +1,28 @@
+With lstat and _lstat are added to MinGW we need to #define lstat along with
+stat because #define'ing stat impacts struct stat, which would otherwise break
+lstat's signature.
+
+Jan Nieuwenhuizen
+
+Upstream status: not yet presented upstream.
+
+--- libtool-2.4.6/build-aux/ltmain.in~ 2015-02-06 13:57:56.0 +0100
 libtool-2.4.6/build-aux/ltmain.in  2016-05-06 07:46:29.425142546 +0200
+@@ -3658,6 +3658,7 @@
+ # define S_IXUSR _S_IEXEC
+ #elif defined __MINGW32__
+ # define setmode _setmode
++# define lstat   _lstat
+ # define stat_stat
+ # define chmod   _chmod
+ # define getcwd  _getcwd
+--- libtool-2.4.6/build-aux/ltmain.sh~ 2015-02-15 17:15:12.0 +0100
 libtool-2.4.6/build-aux/ltmain.sh  2016-05-06 08:31:53.854857844 +0200
+@@ -5576,6 +5577,7 @@
+ # define S_IXUSR _S_IEXEC
+ #elif defined __MINGW32__
+ # define setmode _setmode
++# define lstat   _lstat
+ # define stat_stat
+ # define chmod   _chmod
+ # define getcwd  _getcwd
-- 
2.9.2




[PATCH 08/12] gnu: cross-base: Add cross-libtool.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/cross-base.scm (cross-libtool): New function.
---
 gnu/packages/cross-base.scm | 48 +
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 996e392..f11e8c1 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -21,6 +21,7 @@
 (define-module (gnu packages cross-base)
   #:use-module (gnu packages)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages commencement)
   #:use-module (gnu packages linux)
@@ -35,6 +36,7 @@
   #:use-module (ice-9 match)
   #:export (cross-binutils
 cross-libc
+cross-libtool
 cross-gcc
 cross-newlib?))
 
@@ -463,6 +465,52 @@ XBINUTILS and the cross tool chain."
  ,@(package-inputs glibc) ;FIXME: static-bash
  ,@(package-native-inputs glibc
 
+(define* (cross-libtool target
+#:optional
+(xgcc (cross-gcc target
+ (cross-binutils target)
+ (cross-libc target)))
+(xbinutils (cross-binutils target))
+(xlibc (cross-libc target)))
+  (package
+(inherit libtool)
+(name (string-append "cross-libtool-" target))
+(inputs `(("xlibc" ,xlibc)))
+(native-inputs `(("xgcc" ,xgcc)
+ ("xbinutils" ,xbinutils)
+ ("xlibc" ,xlibc)
+ ,@(package-native-inputs libtool)))
+(arguments
+ `(;; Libltdl is provided as a separate package, so don't install it here.
+   #:configure-flags
+   `("--disable-ltdl-install"
+ ;; The libtool script uses `host' rather than `target' to decide
+ ;; whether to use -lc, for example.
+ ,(string-append "--host=" ,target)
+ ,(string-append "--target=" ,target)
+ ,(string-append "--program-prefix=" ,target "-")
+ ,(string-append "CC=" ,target "-gcc"))
+   #:tests? #f
+   #:phases (modify-phases %standard-phases
+  ;; As we are setup as a cross package, PATHs get setup
+  ;; without the CROSS_ prefix.  Change that here.
+  (add-before 'configure 'setenv
+(lambda* (#:key inputs #:allow-other-keys)
+  (let* ((xgcc (assoc-ref inputs "xgcc"))
+ (xgcc-bin (string-append xgcc "/bin/"
+  ,target "-cpp")))
+(setenv "CPP" xgcc-bin)
+(setenv "CXXCPP" xgcc-bin))
+  (for-each (lambda (var)
+  (and=> (getenv var)
+ (lambda (value)
+   (let ((cross
+  (string-append "CROSS_" 
var)))
+ (setenv cross value))
+   (unsetenv var
+(cons "LIBRARY_PATH" ',%gcc-include-paths))
+  #t)))
+
 (define (native-libc target)
   (if (target-mingw? target)
   mingw-w64
-- 
2.9.2




[PATCH 11/12] gnu: readline: support mingw.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/patches/readline-6.3-mingw.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/readline.scm (readline): Support MinGW.
---
 gnu/packages/readline.scm | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm
index 169a738..e15282e 100644
--- a/gnu/packages/readline.scm
+++ b/gnu/packages/readline.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès 
 ;;; Copyright © 2016 Efraim Flashner 
+;;; Copyright © 2016 Jan Nieuwenhuizen 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,7 +25,8 @@
   #:use-module (gnu packages perl)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix utils))
 
 (define-public readline
   (let ((post-install-phase
@@ -61,8 +63,18 @@
  ;; cross-compiling, so provide the correct answer.
  ,@(if (%current-target-system)
'("bash_cv_wcwidth_broken=no")
+   '())
+ ;; MinGW: ncurses provides the termcap api.
+ ,@(if (target-mingw?)
+   '("bash_cv_termcap_lib=ncurses")
'()))
 
+   ,@(if (target-mingw?)
+ ;; MinGW: termcap in ncurses
+ ;; some SIG_* #defined in _POSIX
+ '(#:make-flags '("TERMCAP_LIB=-lncurses"
+  "CPPFLAGS=-D_POSIX"))
+ '())
#:phases (alist-cons-after
  'install 'post-install
  ,post-install-phase
-- 
2.9.2




[PATCH 06/12] gnu: gmp: build shared library for mingw.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/multiprecision.scm (gmp)[MINGW]: Use --enable-shared.
---
 gnu/packages/multiprecision.scm | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index 46540be..0084ca1 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2014 Mark H Weaver 
 ;;; Copyright © 2015 Andreas Enge 
 ;;; Copyright © 2016 Nicolas Goaziou 
+;;; Copyright © 2016 Jan Nieuwenhuizen 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -49,7 +50,13 @@
 '(;; Build a "fat binary", with routines for several
   ;; sub-architectures.
   "--enable-fat"
-  "--enable-cxx")))
+  "--enable-cxx"
+  ,@(cond ((target-mingw?)
+   ;; Static and shared cannot be built in one go:
+   ;; they produce different headers.  We need shared.
+   `("--disable-static"
+ "--enable-shared"))
+  (else '())
(synopsis "Multiple-precision arithmetic library")
(description
 "GMP is a library for arbitrary precision arithmetic, operating on
-- 
2.9.2




[PATCH 02/12] gnu: Add mingw-w64.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch,
gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch,
gnu/packages/mingw.scm: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
---
 gnu/local.mk   |   3 +
 gnu/packages/mingw.scm |  82 
 .../patches/gcc-4.9.3-mingw-gthr-default.patch |  11 ++
 .../patches/mingw-w64-5.0rc2-gcc-4.9.3.patch   | 218 +
 4 files changed, 314 insertions(+)
 create mode 100644 gnu/packages/mingw.scm
 create mode 100644 gnu/packages/patches/gcc-4.9.3-mingw-gthr-default.patch
 create mode 100644 gnu/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 53621d8..e5aed2b 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -235,6 +235,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/mc.scm  \
   %D%/packages/mcrypt.scm  \
   %D%/packages/messaging.scm   \
+  %D%/packages/mingw.scm   \
   %D%/packages/mg.scm  \
   %D%/packages/mit-krb5.scm\
   %D%/packages/moe.scm \
@@ -516,6 +517,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/gcc-arm-link-spec-fix.patch \
   %D%/packages/patches/gcc-cross-environment-variables.patch   \
   %D%/packages/patches/gcc-libvtv-runpath.patch\
+  %D%/packages/patches/gcc-4.9.3-mingw-gthr-default.patch  \
   %D%/packages/patches/gcc-5.0-libvtv-runpath.patch\
   %D%/packages/patches/gd-fix-gd2-read-test.patch  \
   %D%/packages/patches/gd-fix-tests-on-i686.patch  \
@@ -664,6 +666,7 @@ dist_patch_DATA =   
\
   %D%/packages/patches/mcrypt-CVE-2012-4426.patch  \
   %D%/packages/patches/mcrypt-CVE-2012-4527.patch  \
   %D%/packages/patches/mhash-keygen-test-segfault.patch\
+  %D%/packages/patches/mingw-w64-5.0rc2-gcc-4.9.3.patch\
   %D%/packages/patches/mpc123-initialize-ao.patch  \
   %D%/packages/patches/mplayer2-theora-fix.patch   \
   %D%/packages/patches/module-init-tools-moduledir.patch   \
diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm
new file mode 100644
index 000..61f0bd3
--- /dev/null
+++ b/gnu/packages/mingw.scm
@@ -0,0 +1,82 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Jan Nieuwenhuizen 
+;;;
+;;; 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 .
+
+(define-module (gnu packages mingw)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages cross-base)
+  #:use-module (gnu packages gcc)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages multiprecision)
+  #:use-module (guix build-system gnu)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix utils)
+  #:use-module (ice-9 match))
+
+(define-public mingw-w64
+  (package
+(name "mingw-w64")
+(version "5.0-rc2")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+
"https://sourceforge.net/projects/mingw-w64/files/mingw-w64/";
+"mingw-w64-release/mingw-w64-v" version ".tar.bz2"))
+  (sha256
+   (base32 "0imdary8j07if8ih73pfgxiclpf2ax8h3mz8mxln07i8sbbd30c9"))
+  (patches (search-patches "mingw-w64-5.0rc2-gcc-4.9.3.patch"
+(native-inputs `(("xgcc-core" ,xgcc-sans-libc-i686-w64-mingw32)
+ ("xbinutils" ,xbinutils-i686-w64-mingw32)))
+(build-system gnu-build-system)
+(search-paths
+ (list (search-path-specification
+(variable "CROSS_C_INCLUDE_PATH")
+(files '("include" "i686-w64-mingw32/include")))
+   (search-path-specification
+(variable "CROSS_LIBRARY_PATH")
+(files
+ '("lib" "lib64" "i686-w64-mingw32/lib" 
"i686-w64-mingw32/lib64")
+(arguments
+ `(#:configure-flags '("--host=i686-w64-mingw32")
+   #:phases
+   (modify-phases %standard-phases
+ (

[PATCH 05/12] gnu: libunistring: support mingw: propagate libiconv if needed.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/libunistring (libunistring): propagated-inputs: add
libiconv-if-needed.  Fixes unicode translation in MinGW.
---
 gnu/packages/libunistring.scm | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/libunistring.scm b/gnu/packages/libunistring.scm
index f29b742..a9779d4 100644
--- a/gnu/packages/libunistring.scm
+++ b/gnu/packages/libunistring.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès 
 ;;; Copyright © 2015 Mark H Weaver 
+;;; Copyright © 2016 Jan Nieuwenhuizen 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,7 +22,8 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (gnu packages base))
 
 (define-public libunistring
   (package
@@ -35,7 +37,7 @@
 (sha256
  (base32
   "0ixxmgpgh2v8ifm6hbwsjxl023myk3dfnj7wnvmqjivza31fw9cn"
-   (propagated-inputs '())  ; FIXME: add libiconv when !glibc
+   (propagated-inputs (libiconv-if-needed))
(build-system gnu-build-system)
(arguments
 ;; Work around parallel build issue whereby C files may be compiled before
-- 
2.9.2




[PATCH 04/12] gnu: Add function libiconv-if-needed.

2016-08-17 Thread Jan Nieuwenhuizen
* gnu/packages/base.scm (libiconv-if-needed): New function.
---
 gnu/packages/base.scm | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index a476837..fe11a87 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -46,7 +46,8 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (ice-9 match)
-  #:export (glibc))
+  #:export (glibc
+libiconv-if-needed))
 
 ;;; Commentary:
 ;;;
@@ -997,6 +998,16 @@ program.  It supports a wide variety of different 
encodings.")
 (home-page "http://www.gnu.org/software/libiconv/";)
 (license lgpl3+)))
 
+(define* (libiconv-if-needed #:optional (target (%current-target-system)))
+  "Return either a libiconv package specification to include in a dependency
+list for platforms that have an incomplete libc, or the empty list.  If a
+package needs iconv ,@(libiconv-if-needed) should be added."
+  ;; POSIX C libraries provide iconv.  Platforms with an incomplete libc
+  ;; without iconv, such as MinGW, must return the then clause.
+  (if (target-mingw? target)
+  `(("libiconv" ,libiconv))
+  '()))
+
 (define-public (canonical-package package)
   ;; Avoid circular dependency by lazily resolving 'commencement'.
   (let* ((iface (resolve-interface '(gnu packages commencement)))
-- 
2.9.2




MinGW guile.exe cross build patch series v10

2016-08-17 Thread Jan Nieuwenhuizen
Hi!

Recap how to use these patches

$ ./pre-inst-env guix build --target=i686-w64-mingw32 hello
$ guix environment --ad-hoc wine -- wine 
/gnu/store/9sx5hhdlyk7b3xdv7120yn5742l9xj2p-hello-2.10/bin/hello.exe
Hello, world!

This series addresses the comments from Alex Kost and features slight rewrites
illustrated by Mark Weaver to avoid triggering any rebuilds.  This means now
doing things like, in ncurses

(patches (if (target-mingw?)
 (search-patches "ncurses-mingw.patch")
 '()

I'm not sure if/when/where we want to rewrite such things again in a way you
would write it had we not aimed to avoid rebuilds (i.e., more like the v9
patch set had).

The biggest change wrt v9 that has not been reviewed is #:configure-flags
section in 0007-gnu-ncurses-support-mingw.patch, it would be nice if that
could be simplified.

As suggested by Ludovic, I have tested all individual patches with the
scripts below.

Greetings,
Jan

test
--8<---cut here---start->8---
#! /bin/sh -ex

set -o pipefail;

rm -f test*.log
for i in $(seq 11 -1 0); do
git checkout v10~$i;
git show --no-patch --abbrev-commit --pretty=oneline HEAD > test-$i.log
./TEST |& tee -a test-$i.log
done
--8<---cut here---end--->8---


TEST
--8<---cut here---start->8---
#! /bin/sh -ex

rm -f gnu/packages/cross-base.go gnu/packages/mingw.go
make

./pre-inst-env guix build --quiet gcc-cross-sans-libc-x86_64-linux-gnu
./pre-inst-env guix build --quiet gcc-cross-x86_64-linux-gnu
./pre-inst-env guix build --quiet hello
./pre-inst-env guix build --quiet guile

./pre-inst-env guix build --quiet --target=mips64el-linux-gnuabi64 hello

if grep mingw gnu/packages/cross-base.scm; then
./pre-inst-env guix build --quiet --target=i686-w64-mingw32 hello
fi

if grep mingw gnu/packages/multiprecision.scm; then
./pre-inst-env guix build --quiet --target=i686-w64-mingw32 gmp
fi

if grep mingw gnu/packages/ncurses.scm; then
./pre-inst-env guix build --quiet --target=i686-w64-mingw32 ncurses
fi

if grep mingw gnu/packages/readline.scm; then
./pre-inst-env guix build --quiet --target=i686-w64-mingw32 readline
fi

if grep mingw gnu/packages/guile.scm; then
./pre-inst-env guix build --quiet --target=i686-w64-mingw32 --keep-failed 
guile
fi
--8<---cut here---end--->8---





Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread Leo Famulari
On Wed, Aug 17, 2016 at 09:20:42PM +0200, David Craven wrote:
> Oh, that's embarrassing. I must have forgotten to change the hash and
> guix cached the tarball. Is that possible?

If the hash is matched in the store, the URL is not used, so you won't
see an incorrect URL fail to match the hash.

This is a common cause of buggy patches.

I wonder, are there any drawbacks of making the linter check that the
URL provides the data named by the hash?



Re: [PATCH 17/24] gnu: kwidgetsaddons: Fix test failure.

2016-08-17 Thread David Craven
I'll withhold this patch pending further investigation.

Thank you!



Re: [PATCH 16/24] gnu: gstreamer: Add qt-gstreamer.

2016-08-17 Thread David Craven
I'll withhold this patch for now pending further investigation...

Thank you!



Re: [PATCH] gnu: gnome-maps: Update to 3.18.3.

2016-08-17 Thread ng0
Alex Griffin  writes:

> This patch updates GNOME Maps to 3.18.3, which changes the map tile
> provider to Mapbox after Mapquest revoked GNOME's access.
>
> I tried updating straight to 3.20.2 (the latest), but there were some
> issues I wasn't willing to investigate.

https://mail.gnome.org/archives/distributor-list/2016-July/msg0.html

Earlier versions are also updated, but version bumping the application
also makes sense.

> -- 
> Alex Griffin
> From 14ce2c74c39c4ec26353e28b1dcf2e89b74905ca Mon Sep 17 00:00:00 2001
> From: Alex Griffin 
> Date: Wed, 17 Aug 2016 16:37:58 -0500
> Subject: [PATCH 1/2] gnu: gnome-maps: Update to 3.18.3.
>
> * gnu/packages/geo.scm (gnome-maps): Update to 3.18.3.
> ---
>  gnu/packages/geo.scm | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
> index 1ef5eeb..86828e7 100644
> --- a/gnu/packages/geo.scm
> +++ b/gnu/packages/geo.scm
> @@ -1,5 +1,6 @@
>  ;;; GNU Guix --- Functional package management for GNU
>  ;;; Copyright © 2016 Leo Famulari 
> +;;; Copyright © 2016 Alex Griffin 
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -35,7 +36,7 @@
>  (define-public gnome-maps
>(package
>  (name "gnome-maps")
> -(version "3.18.2")
> +(version "3.18.3")
>  (source (origin
>(method url-fetch)
>(uri (string-append "mirror://gnome/sources/" name "/"
> @@ -43,7 +44,7 @@
>name "-" version ".tar.xz"))
>(sha256
> (base32
> -"0y4jmh5hwskh2mnladh9hxp9k8as7crm8wwwiifvxsjjj9az2gv9"
> +"1vdnr2wmhqhql2gxd5n1ijwk88qhim14izbkczncg35846hfsr5i"
>  (build-system glib-or-gtk-build-system)
>  (arguments
>   `(#:configure-flags ; Ensure that geoclue is referred to by output.
> -- 
> 2.9.3
>

-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org



Re: [PATCH] gnu: libpsl: Update to 0.14.0.

2016-08-17 Thread Tobias Geerinckx-Rice
Andreas,

On 04/08/16 10:09, Andreas Enge wrote:
> I think you can push such trivial changes without asking on the list

Oh, I absolutely agree, but then HACKING reads:

  Non-trivial patches should always be posted to
  guix-devel@gnu.org (trivial patches include fixing typos, etc.)

Choosing typos as an example seemed oddly specific and deliberate to me,
not on the same level as even minor revision bumps.

Glad to hear I was being overly cautious :-)

Kind regards,

T G-R



[PATCH] gnu: gnome-maps: Update to 3.18.3.

2016-08-17 Thread Alex Griffin
This patch updates GNOME Maps to 3.18.3, which changes the map tile
provider to Mapbox after Mapquest revoked GNOME's access.

I tried updating straight to 3.20.2 (the latest), but there were some
issues I wasn't willing to investigate.
-- 
Alex Griffin
From 14ce2c74c39c4ec26353e28b1dcf2e89b74905ca Mon Sep 17 00:00:00 2001
From: Alex Griffin 
Date: Wed, 17 Aug 2016 16:37:58 -0500
Subject: [PATCH 1/2] gnu: gnome-maps: Update to 3.18.3.

* gnu/packages/geo.scm (gnome-maps): Update to 3.18.3.
---
 gnu/packages/geo.scm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 1ef5eeb..86828e7 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Leo Famulari 
+;;; Copyright © 2016 Alex Griffin 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,7 +36,7 @@
 (define-public gnome-maps
   (package
 (name "gnome-maps")
-(version "3.18.2")
+(version "3.18.3")
 (source (origin
   (method url-fetch)
   (uri (string-append "mirror://gnome/sources/" name "/"
@@ -43,7 +44,7 @@
   name "-" version ".tar.xz"))
   (sha256
(base32
-"0y4jmh5hwskh2mnladh9hxp9k8as7crm8wwwiifvxsjjj9az2gv9"
+"1vdnr2wmhqhql2gxd5n1ijwk88qhim14izbkczncg35846hfsr5i"
 (build-system glib-or-gtk-build-system)
 (arguments
  `(#:configure-flags ; Ensure that geoclue is referred to by output.
-- 
2.9.3



Re: [PATCH] gnu: Add interrobang.

2016-08-17 Thread ng0
ng0  writes:

> ng0  writes:
>
>> This patch adds interrobang. It should function, but I don't have zsh
>> configured here in GuixSD, so my old config does not work here, and the
>> system default is up to testing by other people.
>
> To explain this noisy comment:
> I have a special interrobang-zsh-completion script which I prefer to the
> default, bash. I ran interrobang but I still need to figure out why no
> application launches.
> I would prefer additional input.

It works and is functional. I just had to alter the "set shell" in the
config.

>> From 91cc74e39a7ca001d24610f595fe6ce2cf38af0b Mon Sep 17 00:00:00 2001
>> From: ng0 
>> Date: Wed, 17 Aug 2016 20:18:44 +
>> Subject: [PATCH] gnu: Add interrobang.
>>
>> * gnu/packages/admin.scm (interrobang): New variable.
>> ---
>>  gnu/packages/admin.scm | 33 +
>>  1 file changed, 33 insertions(+)
>>
>> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
>> index 09a883c..4cc3757 100644
>> --- a/gnu/packages/admin.scm
>> +++ b/gnu/packages/admin.scm
>> @@ -1734,3 +1734,36 @@ highly portable.  Great for heterogenous networks.")
>>  the status of your battery in the system tray.")
>>  (home-page "https://github.com/valr/cbatticon";)
>>  (license license:gpl2+)))
>> +
>> +(define-public interrobang
>> +  (let ((revision "1")
>> +(commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
>> +(package
>> +  (name "interrobang")
>> +  (version (string-append "0.0.0." revision "." (string-take commit 8)))
>> +  (source (origin
>> +(method git-fetch)
>> +(uri (git-reference
>> +  (url "git://github.com/TrilbyWhite/interrobang")
>> +  (commit commit)))
>> +(file-name (string-append name "-" version "-checkout"))
>> +(sha256
>> + (base32
>> +  "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"
>> +  (build-system gnu-build-system)
>> +  (arguments
>> +   `(#:tests? #f ; no tests
>> + #:phases
>> + (modify-phases %standard-phases
>> +   (delete 'configure)) ; no configure script
>> + #:make-flags (list (string-append "PREFIX="
>> +   (assoc-ref %outputs "out")
>> +  (inputs
>> +   `(("libx11" ,libx11)))
>> +  (native-inputs
>> +   `(("pkg-config" ,pkg-config)))
>> +  (synopsis "Tiny launcher menu packing a big bang syntax")
>> +  (description "Interrobang is a scriptable launcher menu with a 
>> customizable
>> +shortcut syntax and completion options.")
>> +  (home-page "https://github.com/TrilbyWhite/interrobang";)
>> +  (license license:gpl3
>> -- 
>> 2.9.3
>>
>>
>> -- 
>> ng0
>> For non-prism friendly talk find me on http://www.psyced.org
>
> -- 
> ng0
> For non-prism friendly talk find me on http://www.psyced.org
>

-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org



Re: [PATCH] gnu: Add interrobang.

2016-08-17 Thread ng0
ng0  writes:

> This patch adds interrobang. It should function, but I don't have zsh
> configured here in GuixSD, so my old config does not work here, and the
> system default is up to testing by other people.

To explain this noisy comment:
I have a special interrobang-zsh-completion script which I prefer to the
default, bash. I ran interrobang but I still need to figure out why no
application launches.
I would prefer additional input.

> From 91cc74e39a7ca001d24610f595fe6ce2cf38af0b Mon Sep 17 00:00:00 2001
> From: ng0 
> Date: Wed, 17 Aug 2016 20:18:44 +
> Subject: [PATCH] gnu: Add interrobang.
>
> * gnu/packages/admin.scm (interrobang): New variable.
> ---
>  gnu/packages/admin.scm | 33 +
>  1 file changed, 33 insertions(+)
>
> diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
> index 09a883c..4cc3757 100644
> --- a/gnu/packages/admin.scm
> +++ b/gnu/packages/admin.scm
> @@ -1734,3 +1734,36 @@ highly portable.  Great for heterogenous networks.")
>  the status of your battery in the system tray.")
>  (home-page "https://github.com/valr/cbatticon";)
>  (license license:gpl2+)))
> +
> +(define-public interrobang
> +  (let ((revision "1")
> +(commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
> +(package
> +  (name "interrobang")
> +  (version (string-append "0.0.0." revision "." (string-take commit 8)))
> +  (source (origin
> +(method git-fetch)
> +(uri (git-reference
> +  (url "git://github.com/TrilbyWhite/interrobang")
> +  (commit commit)))
> +(file-name (string-append name "-" version "-checkout"))
> +(sha256
> + (base32
> +  "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"
> +  (build-system gnu-build-system)
> +  (arguments
> +   `(#:tests? #f ; no tests
> + #:phases
> + (modify-phases %standard-phases
> +   (delete 'configure)) ; no configure script
> + #:make-flags (list (string-append "PREFIX="
> +   (assoc-ref %outputs "out")
> +  (inputs
> +   `(("libx11" ,libx11)))
> +  (native-inputs
> +   `(("pkg-config" ,pkg-config)))
> +  (synopsis "Tiny launcher menu packing a big bang syntax")
> +  (description "Interrobang is a scriptable launcher menu with a 
> customizable
> +shortcut syntax and completion options.")
> +  (home-page "https://github.com/TrilbyWhite/interrobang";)
> +  (license license:gpl3
> -- 
> 2.9.3
>
>
> -- 
> ng0
> For non-prism friendly talk find me on http://www.psyced.org

-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org



Re: Hardening

2016-08-17 Thread ng0
Alex Vong  writes:

> Hi,
>
> Wow, this was long time ago. I've forgot this completely.
>
> Ricardo Wurmus  writes:
>
>> Leo Famulari  writes:
>>
>>> On Wed, Dec 30, 2015 at 05:06:30PM +0100, Ludovic Courtès wrote:
 Alex Vong  skribis:
 > Yes, I grep for `fstack-protector-strong' in the guix code base and no
 > matches are found. It appears no packages are setting this flag
 > currently. I think this flag (perhaps also a couple others) should be
 > set by default since they help protect against buffer overflow
 > .
 
 I definitely agree, that’s something I’ve been wanting to try out.
 
 The question is more how.  Do we change the default #:configure-flags
 for ‘gnu-build-system’ to something like:
 
   '("CPPFLAGS=-D_FORTIFY_SOURCE=2"
 "CFLAGS=-O2 -g -fstack-protector-strong")
 
 ?
 
 That sounds like a good starting point, but I expect that (1) one third
 of the packages will fail to build, and (2) another third of the
 packages will not get these flags, for instance because they pass their
 own #:configure-flags.
 
 IOW, it will take a whole rebuild to find out exactly what’s going on
 and to fix any issues.
 
 Would you like to start working on it?  Then we could create a branch,
 have Hydra build it, and incrementally fix things.
>>>
>>> We should pick this project back up. I was suprised to find we haven't
>>> done anything like this after reading this recent blog post about Nix's
>>> hardening effort:
>>>
>>> https://blog.mayflower.de/5800-Hardening-Compiler-Flags-for-NixOS.html?utm_source=twitterfeed&utm_medium=twitter
>>
>> Are the above flags the only flags we’d like to play with?  There’s no
>> harm in letting hydra rebuild the world with these flags on a separate
>> branch — provided that all build nodes are usable.
>>
> There are indeed additional flags (for debian's hardening).
>
>
> Here is the complete output (from the testing distribution):
>
> alexvong1995@debian:~$ DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags
> CFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
> -fstack-protector-strong -Wformat -Werror=format-security
> CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
> CXXFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
> -fstack-protector-strong -Wformat -Werror=format-security
> FCFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
> -fstack-protector-strong
> FFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
> -fstack-protector-strong
> GCJFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
> -fstack-protector-strong
> LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now
> OBJCFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
> -fstack-protector-strong -Wformat -Werror=format-security
> OBJCXXFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
> -fstack-protector-strong -Wformat -Werror=format-security
>
>
> The `-fdebug-prefix-map' flag seems to be using the current working
> directory.
>
>> ~~ Ricardo
>
> Cheers,
> Alex
>

I think there's even more, I can add to this thread when I have access
to my hardened vm systems again.

Good to see that this is being picked up again.
-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org



[PATCH] gnu: Add interrobang.

2016-08-17 Thread ng0
This patch adds interrobang. It should function, but I don't have zsh
configured here in GuixSD, so my old config does not work here, and the
system default is up to testing by other people.

>From 91cc74e39a7ca001d24610f595fe6ce2cf38af0b Mon Sep 17 00:00:00 2001
From: ng0 
Date: Wed, 17 Aug 2016 20:18:44 +
Subject: [PATCH] gnu: Add interrobang.

* gnu/packages/admin.scm (interrobang): New variable.
---
 gnu/packages/admin.scm | 33 +
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 09a883c..4cc3757 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1734,3 +1734,36 @@ highly portable.  Great for heterogenous networks.")
 the status of your battery in the system tray.")
 (home-page "https://github.com/valr/cbatticon";)
 (license license:gpl2+)))
+
+(define-public interrobang
+  (let ((revision "1")
+(commit "896543735e1c99144765fdbd7b6e6b5afbd8b881"))
+(package
+  (name "interrobang")
+  (version (string-append "0.0.0." revision "." (string-take commit 8)))
+  (source (origin
+(method git-fetch)
+(uri (git-reference
+  (url "git://github.com/TrilbyWhite/interrobang")
+  (commit commit)))
+(file-name (string-append name "-" version "-checkout"))
+(sha256
+ (base32
+  "1n13m70p1hfba5dy3i8hfclbr6k9q3d9dai3dg4jvhdhmxcpjzdf"
+  (build-system gnu-build-system)
+  (arguments
+   `(#:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+   (delete 'configure)) ; no configure script
+ #:make-flags (list (string-append "PREFIX="
+   (assoc-ref %outputs "out")
+  (inputs
+   `(("libx11" ,libx11)))
+  (native-inputs
+   `(("pkg-config" ,pkg-config)))
+  (synopsis "Tiny launcher menu packing a big bang syntax")
+  (description "Interrobang is a scriptable launcher menu with a customizable
+shortcut syntax and completion options.")
+  (home-page "https://github.com/TrilbyWhite/interrobang";)
+  (license license:gpl3
-- 
2.9.3


-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org


Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread David Craven
>> I don't believe you :-)
>
> Oh, that's embarrassing. I must have forgotten to change the hash and
> guix cached the tarball. Is that possible?

Sorry about that. I make many stupid mistakes, but I'm not a liar... ;-)



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread David Craven
> I don't believe you :-)

Oh, that's embarrassing. I must have forgotten to change the hash and
guix cached the tarball. Is that possible?



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread Alex Kost
David Craven (2016-08-17 11:30 +0300) wrote:

>> Also there is a real release that shouldn't require autoreconf phase:
>> 
>> Did you try using it?
>
> Just did, and requires running autoreconf too...

I don't believe you :-)

I've just tried, and autoreconf is not needed for this tarball:

(define-public snappy
  (package
(name "snappy")
(version "1.1.3")
(source (origin
  (method url-fetch)
  (uri (string-append
"https://github.com/google/snappy/releases/download/";
version "/" name "-" version ".tar.gz"))
  (sha256
   (base32
"1wzf8yif5ym2gj52db6v5m1pxnmn258i38x7llk9x346y2nq47ig"
(build-system gnu-build-system)
(home-page "https://github.com/google/snappy";)
(synopsis "Fast compressor/decompressor")
(description "Snappy is a compression/decompression library. It does not
aim for maximum compression, or compatibility with any other compression 
library;
instead, it aims for very high speeds and reasonable compression. For instance,
compared to the fastest mode of zlib, Snappy is an order of magnitude faster
for most inputs, but the resulting compressed files are anywhere from 20% to
100% bigger.")
(license license:asl2.0)))

-- 
Alex



Re: [PATCH v3] gnu: Add python-lirc, python2-lirc.

2016-08-17 Thread Alex Kost
Leo Famulari (2016-08-17 00:41 +0300) wrote:

> On Tue, Aug 16, 2016 at 11:28:09PM +0200, Danny Milosavljevic wrote:
>> gnu: Add python-lirc, python2-lirc.
>> 
>> * gnu/packages/lirc.scm (python-lirc, python2-lirc): New variables.
>
> Thanks, applied as 231313f76!

Ahem, you both are fast: I was commenting on the first patch, and
suddenly found that the third revision is already pushed :-)
Anyway, some comments:

Danny Milosavljevic (2016-08-17 00:28 +0300) wrote:

> gnu: Add python-lirc, python2-lirc.
>
> * gnu/packages/lirc.scm (python-lirc, python2-lirc): New variables.
> ---
>  gnu/packages/lirc.scm | 51 
> +++
>  1 file changed, 51 insertions(+)
>
>
> diff --git a/gnu/packages/lirc.scm b/gnu/packages/lirc.scm
> index e3f60e3..d055bc4 100644
> --- a/gnu/packages/lirc.scm
> +++ b/gnu/packages/lirc.scm
> @@ -19,7 +19,9 @@
>  (define-module (gnu packages lirc)
>#:use-module (guix packages)
>#:use-module (guix download)
> +  #:use-module (guix git-download)
>#:use-module (guix build-system gnu)
> +  #:use-module (guix build-system python)
>#:use-module ((guix licenses) #:prefix license:)
>#:use-module (gnu packages)
>#:use-module (gnu packages pkg-config)
> @@ -85,3 +87,52 @@ user space applications allow you to control your computer 
> with a remote
>  control: you can send X events to applications, start programs and much more
>  on just one button press.")
>  (license license:gpl2+)))

Indentation of 'python-lirc' is not perfect:

> +(define-public python-lirc
> + (let ((commit "4091fe918f3eed2513dad008828565cace408d2f")
^^
should be moved one char to the right:

> +   (revision "1"))
> +  (package
 ^^^
Likewise (you did it right in 'python2-lirc' package):

(define-public python-lirc
  (let ((commit "4091fe918f3eed2513dad008828565cace408d2f")
(revision "1"))
(package ...)))

> +(name "python-lirc")
> +(version (string-append "1.2.1-" revision "." (string-take commit 7)))
> +(source
> +  (origin
> +(method git-fetch)
> +(uri (git-reference
> +   (url "https://github.com/tompreston/python-lirc.git";)
> +   (commit commit)))
> +(sha256
> +  (base32
> +"0cm47s5pvijfs3v2k7hmpxv3mvp4n5la0ihnsczk5ym3iq166jil"))
> +(file-name (string-append name "-" version ".tar.gz"

This is not a tarball, but a directory (git checkout) so it is a strange
name for it.  We usually name such things like this:

  (file-name (string-append name "-" version "-checkout"))


> +(build-system python-build-system)
> +(inputs
> + `(("lirc" ,lirc)))
> +(native-inputs
> + `(("python-cython" ,python-cython)))
> +(arguments
> + `(#:tests? #f ; the only tests that exist are human-interactive
> +   #:phases
> +(modify-phases %standard-phases
  ^^

this (modify-phases ...) should be shifted one char left

> +  (add-before 'build 'build-from-cython-files
> +(lambda _
> +  (zero? (system* "make" "py3")))
> +(home-page "https://github.com/tompreston/python-lirc";)
> +(synopsis "Python bindings for LIRC.")
> +(description "@code{lirc} is a Python module which provides LIRC 
> bindings.")

I don't think the description should begin with "@code{lirc}" as it is
not LIRC itself but a python library for LIRC.

> +(license license:gpl3)
> +(properties `((python2-variant . ,(delay python2-lirc)))
> +
> +(define-public python2-lirc
> +  (let ((base (package-with-python2 (strip-python2-variant python-lirc
> +(package
> +  (inherit base)
> +  (arguments
> +   `(#:tests? #f ; the only tests there are are human-interactive
> + #:phases
> +  (modify-phases %standard-phases
^^
the same as above

> +(add-before 'build 'build-from-cython-files
> +  (lambda _
> +(zero? (system* "make" "py2")))
> +  (native-inputs
> +   `(("python2-setuptools" ,python2-setuptools)
> + ("python2-cython" ,python2-cython))

-- 
Alex



Re: [PATCH 10/24] gnu: networkmanager-qt: Propagate network-manager.

2016-08-17 Thread David Craven
> Is it possible to avoid propagating?

Quoting the manual on the section on propagated-inputs:

> For example this is necessary when a C/C++ library needs headers of another 
> library to compile, ...

So the fact that the headers of networkmanager-qt include headers from
network-manager, means that a library that uses networkmanager-qt also
needs network-manager's header files. After compilation if there
aren't any references to network-manager it won't be included in the
RUNPATH.

> or when a pkg-config file refers to another one via its Requires field.

I think the equivalent for cmake packages is a find_dependency call
inside of /lib/cmake. In this case a library that links agains
networkmanager-qt doesn't need to link agains network-manager.

> find_dependency(Qt5Core 5.4.0)

So to build hawaii-shell that depends on networkmanager-qt I either
have to add network-manager as an input or propagate it in
networkmanager-qt. I don't think that propagating the input hurts:

guix gc --references $(guix build hawaii-shell) ~/guix
/gnu/store/1i3xmm18dw9kq6wi46f6sj9nxy9pckjl-alsa-lib-1.0.27.1
/gnu/store/3a3qhlr9ssczrkjr10jllb01mbdgsijp-pulseaudio-8.0
/gnu/store/8advwv6y780wf8l4inmrm4vzrqd56z5b-libxkbcommon-0.6.1
/gnu/store/9jfrsgr6jw9hzqj81p3vn632m79x5gla-wayland-1.11.0
/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib
/gnu/store/b8c1aaw3nghvvw6w6hc7r701rg40f5qw-qtdeclarative-5.7.0
/gnu/store/bski0qimql11q9b86h8jhhyksk1z52vp-greenisland-0.8.90
/gnu/store/hnbnz18xkkq83ckk2ph8qgbc8z4qzm6f-qtbase-5.7.0
/gnu/store/ig30hr17jq27b8wnimf9lnksgk6q4k7f-hawaii-shell-0.7.1
/gnu/store/l1s4cw9g58hmcpd2qgbckfl228143qzx-glib-2.48.0
/gnu/store/l878cqim3hl8mj7iz5a2v3mv1zn81qyr-solid-5.24.0
/gnu/store/lyisag3k6wx0pmrd0al0ipgcqaf0hpwi-qtwayland-5.7.0
/gnu/store/m4xna3zq2il5an61wxbmfv82ndvz70f6-linux-pam-1.2.1
/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23
/gnu/store/n3jss47pj11zq1viyibfcg0jf0ag519s-mesa-12.0.0
/gnu/store/qh2q5h2b81562ji5i9kb4nhg74gzk7n9-libhawaii-0.8.0
/gnu/store/qz5d1c538qigsws9k8hlys2hvhvbfrpc-networkmanager-qt-5.24.0
/gnu/store/r129q7kkd28xrp0slw2dqgmbs608gcgv-libqtxdg-1.2.0
/gnu/store/ykzwykkvr2c80rw4l1qh3mvfdkl7jibi-bash-4.3.42
/gnu/store/zvg8qyjsz20vjd170h4ilk7pnv7bqmm6-eudev-3.1.5

WDYT?



Re: [PATCH 10/24] gnu: networkmanager-qt: Propagate network-manager.

2016-08-17 Thread Alex Kost
David Craven (2016-08-17 12:34 +0300) wrote:

>> Also there should be a reason for propagating (probably written as a
>> comment).  Ideally it should be avoided.
>
> I added comments:
>
> (propagated-inputs
>   ; Headers contain #include  and
>   ;#include 
>   `(("network-manager" ,network-manager)))
>
> (propagated-inputs
>  ; Headers contain #include 
>  `(("modem-manager", modem-manager)))

These comments should begin with ";;", not with ";".  Sorry, but I still
don't understand the reason.  What exactly does not work when these are
simple inputs?  Is it possible to avoid propagating?

-- 
Alex



Re: [PATCH 08/24] gnu: xorg: Add lndir.

2016-08-17 Thread Alex Kost
David Craven (2016-08-17 11:35 +0300) wrote:

>> The patch looks good to me, except the indentation of this
>>
>> (string-append ...).  I usually write 'source' fields like this:
>>
>>(source (origin
>>  (method url-fetch)
>>  (uri (string-append "mirror://xorg/individual/util/lndir-"
>>  version ".tar.bz2"))
>>  (sha256
>>   (base32
>>"0pdngiy8zdhsiqx2am75yfcl36l7kd7d7nl0rss8shcdvsqgmx29"
>>
>> But this is not a big deal, of course :-)
>
> I prefer
> (uri (string-append
> "mirror://xorg/individual/util/"
> "lndir-" version ".tar.bz2"))

OK, but then it should be (note the indentation of 'string-append'):

  (uri (string-append
"mirror://xorg/individual/util/"
"lndir-" version ".tar.bz2"))

> But in this case I thought that keeping consistent with how it was
> done in the xorg.scm file was more important than my preference. What
> do you think?

Many (probably most) packages in xorg.scm have bad indentation.

-- 
Alex



Re: [PATCH 1/1] Go: Update to 1.7

2016-08-17 Thread Petter

Hi Alex,

Great, thank you!


On 2016-08-17 17:54, Alex Griffin wrote:

On Wed, Aug 17, 2016, at 04:34 AM, Petter wrote:

Hi,

Made an attempt to update my first package.

Hope it's good!


Hi Petter,

Thanks for contributing! Your changes work for me, but it looks like
your mail client mangled the formatting of your patch. So I produced a
good patch with your changes, and added a copyright line and commit
message for you. Hopefully that will make it easier for someone with
commit access to look it over.




[PATCH] gnu: Add python-odfpy.

2016-08-17 Thread Marius Bakke
>From aa54aaee18b096780220f85a02b7e036458858a2 Mon Sep 17 00:00:00 2001
From: Marius Bakke 
Date: Wed, 17 Aug 2016 17:45:24 +0100
Subject: [PATCH] gnu: Add python-odfpy.

* gnu/packages/python.scm (python-odfpy, python2-odfpy): New variables.
---
 gnu/packages/python.scm | 32 
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d7886d9..ca3df19 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -25,6 +25,7 @@
 ;;; Copyright © 2016 Troy Sankey 
 ;;; Copyright © 2016 ng0 
 ;;; Copyright © 2016 Dylan Jeffers 
+;;; Copyright © 2016 Marius Bakke 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -9983,3 +9984,34 @@ hardware-accelerated multitouch applications.")
 
 (define-public python2-kivy-next
   (package-with-python2 python-kivy-next))
+
+(define-public python-odfpy
+  (package
+(name "python-odfpy")
+(version "1.3.3")
+(source
+ (origin
+   (method url-fetch)
+   (uri (pypi-uri "odfpy" version))
+   (sha256
+(base32
+ "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (replace 'check
+   (lambda _ (zero? (system* "make" "-C" "tests")))
+(native-inputs
+ ;; The test runner wants to check both python versions at once.
+ ;; To avoid patching it, we add them here.
+ `(("python-2" ,python-2)
+   ("python-3" ,python-3)))
+(build-system python-build-system)
+(home-page "https://github.com/eea/odfpy";)
+(synopsis "API for OpenDocument in Python")
+(description "Collection of utility programs written in Python to
+manipulate OpenDocument 1.2 files.")
+(license (list asl2.0 gpl2+
+
+(define-public python2-odfpy
+  (package-with-python2 python-odfpy))
-- 
2.9.2




[PATCH] gnu: bs1770gain: Update to 0.4.11.

2016-08-17 Thread Alex Griffin
This patch just updates bs1770gain to 0.4.11, which includes a number of
bug fixes.
-- 
Alex Griffin
From c08d5616bdb579780d910429bd81ec7ec36491f3 Mon Sep 17 00:00:00 2001
From: Alex Griffin 
Date: Tue, 16 Aug 2016 13:58:07 -0500
Subject: [PATCH 1/2] gnu: bs1770gain: Update to 0.4.11.

* gnu/packages/audio.scm (bs1770gain): Update to 0.4.11.
---
 gnu/packages/audio.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 5c42aaa..de634c5 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2430,7 +2430,7 @@ with support for HD extensions.")
 (define-public bs1770gain
   (package
 (name "bs1770gain")
-(version "0.4.10")
+(version "0.4.11")
 (source
  (origin
(method url-fetch)
@@ -2438,7 +2438,7 @@ with support for HD extensions.")
version "/bs1770gain-" version ".tar.gz"))
(sha256
 (base32
- "1syr8qchs8091z9ayivj723szlidx81gll099bmk9kgpykmckd62"
+ "0j765drdb7h3y5ipjv9sg1a0if6zh8cksbv3rdk5ppd7kxcrjnlb"
 (build-system gnu-build-system)
 (inputs `(("ffmpeg" ,ffmpeg)
   ("sox" ,sox)))
-- 
2.9.3



Re: [PATCH 00/13] KDE Frameworks Tier 2 packages and phonon/gpgmepp.

2016-08-17 Thread David Craven
Nope, tier 3 packages have quite a few inter-dependencies. There is
currently only one tier 4 package. Quoting the website:

"Tier 4 frameworks can be mostly ignored by application programmers;
this tier consists of plugins acting behind the scenes to provide
additional functionality or platform integration to existing
frameworks (including Qt)."

Currently I can build all tier 3 packages except kdewebkit, which I
think requires qtwebengine and qtwebview. Qtwebengine is going to take
some effort, I've already made some progress, since I also need it to
build calamares. Other than that I need to debug test failures, fixing
all the easy ones will probably take me an afternoon.

I've also made progress on sddm and hawaii-desktop. It would be nice
if we could get the mesa update in sometime, and I've got a patch to
xorg-server to enable Xephyr, which is required by sddm.

[0] https://api.kde.org/frameworks/index.html



Re: [PATCH 00/13] KDE Frameworks Tier 2 packages and phonon/gpgmepp.

2016-08-17 Thread Andreas Enge
On Sat, Aug 13, 2016 at 02:19:18PM +0200, David Craven wrote:
> kactivities-stats is also listed as a tier 2 package on the KDE Frameworks
> website, but since kactivities (a tier 3 package) is a dependency, I'm putting
> it with the tier 3 packages.

Well, it would be a tier 4 package then, no?

Andreas




Re: [PATCH 1/1] Go: Update to 1.7

2016-08-17 Thread Alex Griffin
On Wed, Aug 17, 2016, at 04:34 AM, Petter wrote:
> Hi,
> 
> Made an attempt to update my first package.
> 
> Hope it's good!

Hi Petter,

Thanks for contributing! Your changes work for me, but it looks like
your mail client mangled the formatting of your patch. So I produced a
good patch with your changes, and added a copyright line and commit
message for you. Hopefully that will make it easier for someone with
commit access to look it over.

-- 
Alex Griffin
From f2f28e088f2a3f833251c2b31de7e6f531bcdf9a Mon Sep 17 00:00:00 2001
From: Petter 
Date: Wed, 17 Aug 2016 10:27:04 -0500
Subject: [PATCH] gnu: go: Update to 1.7.

* gnu/packages/golang.scm (go-1.6): Update to 1.7, with corresponding
  minor changes to prebuild phase, and rename variable to...
  (go-1.7): ...this new variable.
  (go): Inherit from new "go-1.7".
---
 gnu/packages/golang.scm | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 09d962d..afa3a36 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2016 Matthew Jordan 
 ;;; Copyright © 2016 Andy Wingo 
 ;;; Copyright © 2016 Ludovic Courtès 
+;;; Copyright © 2016 Petter 
 ;;;
 ;;; This file is an addendum GNU Guix.
 ;;;
@@ -185,11 +186,11 @@ garbage collection, various safety features and in the 
style of communicating
 sequential processes (CSP) concurrent programming features added.")
 (license license:bsd-3)))
 
-(define-public go-1.6
+(define-public go-1.7
   (package
 (inherit go-1.4)
 (name "go")
-(version "1.6.3")
+(version "1.7")
 (source
  (origin
(method url-fetch)
@@ -197,7 +198,7 @@ sequential processes (CSP) concurrent programming features 
added.")
name version ".src.tar.gz"))
(sha256
 (base32
- "002v6irgfd63zp9iza8nski5by0lar033j3ddpqiikw6bznsw9k3"
+ "1h712yd5wk5mrj2dixc9z2xlgksfks00yvglrkrgr488p8b0qs3j"
 (arguments
  (substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -216,11 +217,14 @@ sequential processes (CSP) concurrent programming 
features added.")
  ;; Removing net/ tests, which fail when attempting to access
  ;; network resources not present in the build container.
  (for-each delete-file
-   '("net/listen_test.go" "net/parse_test.go"))
+   '("net/listen_test.go"
+ "net/parse_test.go"
+ "net/cgo_unix_test.go"))
 
  (substitute* "os/os_test.go"
(("/usr/bin") (getcwd))
-   (("/bin/pwd") (which "pwd")))
+   (("/bin/pwd") (which "pwd"))
+   (("/bin/sh") (which "sh")))
 
  ;; Add libgcc to runpath
  (substitute* "cmd/link/internal/ld/lib.go"
@@ -275,7 +279,7 @@ sequential processes (CSP) concurrent programming features 
added.")
 
  ;; fix shebang for testar script
  ;; note the target script is generated at build time.
- (substitute* "../misc/cgo/testcarchive/test.bash"
+ (substitute* "../misc/cgo/testcarchive/carchive_test.go"
(("#!/usr/bin/env") (string-append "#!" (which "env"
 
  (substitute* "net/lookup_unix.go"
@@ -336,4 +340,4 @@ sequential processes (CSP) concurrent programming features 
added.")
  `(("go" ,go-1.4)
,@(package-native-inputs go-1.4)
 
-(define-public go go-1.6)
+(define-public go go-1.7)
-- 
2.9.3



Re: [PATCH] gnu: libftdi: Propagate the libusb input.

2016-08-17 Thread Andreas Enge
Hello,

On Tue, Aug 16, 2016 at 08:09:52PM +0200, Danny Milosavljevic wrote:
> gnu: libftdi: Propagate the libusb input.
> * gnu/packages/libftdi.scm (libftdi): Modified.

Rather: "Move libusb from native-inputs to inputs."

> -(inputs
> +(propagated-inputs

Please add a quick comment why this is needed (.pc file, header file
is used or something similar).

Thanks!

Andreas




Re: [PATCH] gnu: Add re2.

2016-08-17 Thread Marius Bakke
Marius Bakke  writes:

> Leo Famulari  writes:
>
>> On Mon, Aug 15, 2016 at 02:05:16PM +0100, Marius Bakke wrote:
>>> 
>>> I wasn't sure where to put this, so went with its own file. It does not
>>> fully implement PCRE so pcre.scm seems inappropriate. Perhaps that could
>>> be renamed to regex.scm or similar.
>>
>> The patch looks good, but please put it in regex.scm! But, I don't want
>> to move all the regex packages into this new regex module. Perhaps tre,
>> since it appears to have no users in our tree.
>
> Moved to regex.scm. Thanks!

..and here is a patch that moves tre.scm over as well. The code is
unchanged apart from license: prefix.

>From 8e673ebd8c68c3a92fa60b56068339c011607752 Mon Sep 17 00:00:00 2001
From: Marius Bakke 
Date: Wed, 17 Aug 2016 16:10:15 +0100
Subject: [PATCH 2/2] gnu: tre: Move to regex.scm.

* gnu/packages/tre.scm (tre): Move from here ...
* gnu/packages/regex.scm (tre): ... to here.
* gnu/packages/tre.scm: Delete file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Remove tre.scm.
---
 gnu/local.mk   |  1 -
 gnu/packages/regex.scm | 34 ++
 gnu/packages/tre.scm   | 57 --
 3 files changed, 34 insertions(+), 58 deletions(-)
 delete mode 100644 gnu/packages/tre.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index a18ed44..ebf2d13 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -342,7 +342,6 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/tls.scm\
   %D%/packages/tmux.scm\
   %D%/packages/tor.scm\
-  %D%/packages/tre.scm\
   %D%/packages/tv.scm\
   %D%/packages/unrtf.scm			\
   %D%/packages/upnp.scm\
diff --git a/gnu/packages/regex.scm b/gnu/packages/regex.scm
index cea9db8..b34b26d 100644
--- a/gnu/packages/regex.scm
+++ b/gnu/packages/regex.scm
@@ -1,4 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2014 John Darrington
+;;; Copyright © 2015 Mark H Weaver 
 ;;; Copyright © 2016 Marius Bakke 
 ;;;
 ;;; This file is part of GNU Guix.
@@ -55,3 +57,35 @@
 backtracking regular expression engines like those used in PCRE, Perl and
 Python.  It is a C++ library.")
  (license license:bsd-3)))
+
+(define-public tre
+  (package
+(name "tre")
+(version "0.8.0")
+(source
+  (origin
+(method url-fetch)
+(uri
+  (string-append "http://laurikari.net/tre/"; name "-" version
+ ".tar.bz2"))
+(sha256
+  (base32 "0n36cgqys59r2gmb7jzbqiwsy790v8nbxk82d2n2saz0rp145ild"
+
+(build-system gnu-build-system)
+(arguments
+ `(#:phases (alist-cons-before
+ 'check 'install-locales
+  (lambda _
+;; The tests require the availability of the
+;; 'en_US.ISO-8859-1' locale.
+(setenv "LOCPATH" (getcwd))
+(zero? (system* "localedef" "--no-archive"
+"--prefix" (getcwd) "-i" "en_US"
+"-f" "ISO-8859-1" "./en_US.ISO-8859-1")))
+ %standard-phases)))
+(synopsis "Approximate regex matching library and agrep utility")
+(description "Superset of the POSIX regex API, enabling approximate
+matching.  Also ships a version of the agrep utility which behaves similar to
+grep but features inexact matching.")
+(home-page "http://laurikari.net/tre";)
+(license license:bsd-2)))
diff --git a/gnu/packages/tre.scm b/gnu/packages/tre.scm
deleted file mode 100644
index 721a350..000
--- a/gnu/packages/tre.scm
+++ /dev/null
@@ -1,57 +0,0 @@
-;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014 John Darrington
-;;; Copyright © 2015 Mark H Weaver 
-;;;
-;;; 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 .
-
-(define-module (gnu packages tre)
-  #:use-module (gnu packages)
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix build-system gnu)
-  #:use-module (guix licenses))
-
-(define-public tre
-  (package
-(name "tre")
-(version "0.8.0")
-(source
-  (origin
-(method url-fetch)
-(uri
-  (string-append "http://laurikari.net/tre/"; name "-" version
- ".tar.bz2"))
-(sha256
-  (base32 "0n36cgqys59r2gmb7jzbqiwsy790v8nbxk82d2n2saz0rp145ild"))

Re: [PATCH 16/24] gnu: gstreamer: Add qt-gstreamer.

2016-08-17 Thread Eric Bavier

On 2016-08-17 06:14, David Craven wrote:

Is boost propagated due to header references?


The include files reference these headers:

#include 
#include 
#include 
#include 


what is the reason for disabling runpath validation?


I'm getting a bunch of these errors. The problem seems to be that
/gnu/store/2g5xcc8hp16nfnf37449f3p492m8i03h-qt-gstreamer-1.2.0-1.fc159e5/lib64


Can you get qt-gstreamer to install its libraries into 
"/gnu/store/...-qt-gstreamer-1.2.0-=.fc159e5/lib"?  Things might Just 
Work™ then.


--
`~Eric



Re: [PATCH] gnu: Add dlib.

2016-08-17 Thread Marius Bakke
Ben Woodcroft  writes:

> On 17/08/16 09:45, Leo Famulari wrote:
>> On Wed, Aug 17, 2016 at 09:31:11AM +1000, Ben Woodcroft wrote:
>>>
>>> On 17/08/16 06:47, Leo Famulari wrote:
 On Tue, Aug 16, 2016 at 11:45:16AM +0100, Marius Bakke wrote:
> I initially made this package on a foreign distro without "lapack" in
> inputs and have verified that dropping LAPACK makes the tests pass.
>
> I also found some other optional dependencies after digging around the
> source, as well as a recommendation to disable/enable asserts:
>
> http://dlib.net/dlib/config.h.html
>
> Ben, Leo: Can you try the following patch and see if that works for you?
 Yes, this patch builds for me.
>>> Me too, although it appeared non-deterministic. I'm afraid I haven't time to
>>> see if this patch is suitable to push just now. Leo?
>> How did it appear non-deterministic to you?
> Just based on guix build --check:
>
> guix build: error: build failed: derivation 
> `/gnu/store/sxybcxw64q1ajzq6dysal75ffgq6238i-dlib-19.1.drv' may not be 
> deterministic: output 
> `/gnu/store/il57dcii4pzii11zlixjjxxxw699bg5x-dlib-19.1' differs
>
> I'm actually not sure, why does it say "may not be deterministic"? If it 
> builds twice and the second version is different, doesn't that mean it 
> is definitely not deterministic by counter-example, unless there has 
> been some leakage into the build container?
>
> I also tried building it with #parallel-build? #f and #parallel-tests? 
> #f. It worked in the first round but failed the second.
>
> Note also that the 'disable-asserts' phase should end with '#t'.

I've attached a patch with a #t in the disable-asserts phase, and also
deleting the 6MB static library.

Since `guix build --rounds=2` passes, is there any reason to delay this
patch? I've built this on GuixSD and a foreign distro and naively
verified that they are the same (the .so and all headers have the same
checksum; some of the recorded cmake input paths are different though).

Thanks,
Marius

>From 77f74972d095aeb08367e00c9d683137bd7a35f3 Mon Sep 17 00:00:00 2001
From: Marius Bakke 
Date: Sat, 13 Aug 2016 11:26:10 +0100
Subject: [PATCH] gnu: Add dlib.

* gnu/packages/machine-learning.scm (dlib): New variable.
---
 gnu/packages/machine-learning.scm | 67 ++-
 1 file changed, 66 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index f96672c..4332045 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016 Ricardo Wurmus 
 ;;; Copyright © 2016 Efraim Flashner 
+;;; Copyright © 2016 Marius Bakke 
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -27,18 +28,21 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system r)
   #:use-module (gnu packages)
+  #:use-module (gnu packages algebra)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages dejagnu)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages image)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages swig)
-  #:use-module (gnu packages xml))
+  #:use-module (gnu packages xml)
+  #:use-module (gnu packages xorg))
 
 (define-public libsvm
   (package
@@ -467,3 +471,64 @@ geometric models.")
  "This package provides functions for feed-forward neural networks with a
 single hidden layer, and for multinomial log-linear models.")
 (license (list license:gpl2+ license:gpl3+
+
+(define-public dlib
+  (package
+(name "dlib")
+(version "19.1")
+(source (origin
+  (method url-fetch)
+  (uri (string-append
+"http://dlib.net/files/dlib-"; version ".tar.bz2"))
+  (sha256
+   (base32
+"0p2pvcdalc6jhb6r99ybvjd9x74sclr0ngswdg9j2xl5pj7knbr4"))
+  (modules '((guix build utils)))
+  (snippet
+   '(begin
+  ;; Delete ~13MB of bundled dependencies.
+  (delete-file-recursively "dlib/external")
+  (delete-file-recursively "docs/dlib/external")
+(build-system cmake-build-system)
+(arguments
+ `(#:phases
+   (modify-phases %standard-phases
+ (add-after 'unpack 'disable-asserts
+   (lambda _
+ ;; config.h recommends explicitly enabling or disabling asserts
+ ;; when building as a shared library. By default neither is set.
+ (substitute* "dlib/config.h"
+   (("^//#define DLIB_DISABLE_ASSERTS") "#define DLIB_DISABLE_ASSERTS"))
+ #t))
+ (replace 'check
+   (lambda

Re: Hardening

2016-08-17 Thread Alex Vong
Hi,

Wow, this was long time ago. I've forgot this completely.

Ricardo Wurmus  writes:

> Leo Famulari  writes:
>
>> On Wed, Dec 30, 2015 at 05:06:30PM +0100, Ludovic Courtès wrote:
>>> Alex Vong  skribis:
>>> > Yes, I grep for `fstack-protector-strong' in the guix code base and no
>>> > matches are found. It appears no packages are setting this flag
>>> > currently. I think this flag (perhaps also a couple others) should be
>>> > set by default since they help protect against buffer overflow
>>> > .
>>> 
>>> I definitely agree, that’s something I’ve been wanting to try out.
>>> 
>>> The question is more how.  Do we change the default #:configure-flags
>>> for ‘gnu-build-system’ to something like:
>>> 
>>>   '("CPPFLAGS=-D_FORTIFY_SOURCE=2"
>>> "CFLAGS=-O2 -g -fstack-protector-strong")
>>> 
>>> ?
>>> 
>>> That sounds like a good starting point, but I expect that (1) one third
>>> of the packages will fail to build, and (2) another third of the
>>> packages will not get these flags, for instance because they pass their
>>> own #:configure-flags.
>>> 
>>> IOW, it will take a whole rebuild to find out exactly what’s going on
>>> and to fix any issues.
>>> 
>>> Would you like to start working on it?  Then we could create a branch,
>>> have Hydra build it, and incrementally fix things.
>>
>> We should pick this project back up. I was suprised to find we haven't
>> done anything like this after reading this recent blog post about Nix's
>> hardening effort:
>>
>> https://blog.mayflower.de/5800-Hardening-Compiler-Flags-for-NixOS.html?utm_source=twitterfeed&utm_medium=twitter
>
> Are the above flags the only flags we’d like to play with?  There’s no
> harm in letting hydra rebuild the world with these flags on a separate
> branch — provided that all build nodes are usable.
>
There are indeed additional flags (for debian's hardening).


Here is the complete output (from the testing distribution):

alexvong1995@debian:~$ DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags
CFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
-fstack-protector-strong -Wformat -Werror=format-security
CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2
CXXFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
-fstack-protector-strong -Wformat -Werror=format-security
FCFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
-fstack-protector-strong
FFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
-fstack-protector-strong
GCJFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
-fstack-protector-strong
LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now
OBJCFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
-fstack-protector-strong -Wformat -Werror=format-security
OBJCXXFLAGS=-g -O2 -fdebug-prefix-map=/home/alexvong1995=. -fPIE 
-fstack-protector-strong -Wformat -Werror=format-security


The `-fdebug-prefix-map' flag seems to be using the current working
directory.

> ~~ Ricardo

Cheers,
Alex



Re: Our git just broke [PATCH]: gnu: Add stagit, adjust version-control.scm.

2016-08-17 Thread ng0
Hi,

can someone comment on this patch if there are changes I need to make?

ng0  writes:

> Leo Famulari  writes:
>
>> On Sat, Aug 13, 2016 at 10:41:59PM +1000, Ben Woodcroft wrote:
>>> Hi,
>>> 
>>> I cannot currently build git on the master branch. I bisected and got to
>>> this commit. I had a quick look but couldn't see what the problem was. The
>>> new package builds fine. Can someone take a look please?
>>> 
>>> 
>>> b3885778e8e438e8526a8ee9e96072fd00f5cae5 is the first bad commit
>>> commit b3885778e8e438e8526a8ee9e96072fd00f5cae5
>>> Author: ng0 
>>> Date:   Wed Aug 10 10:04:29 2016 +
>>> 
>>> gnu: Add stagit.
>>> 
>>> * gnu/packages/version-control.scm (stagit): New variable.
>>> 
>>> Signed-off-by: Leo Famulari 
>>
>> Oops! I've reverted the commit.
>>
>> The variable expat is defined twice. We need to change
>> version-control.scm to use a license prefix rather than selecting
>> licenses.
>>
>> ng0, will you update version-control.scm to use a license prefix and
>> re-send an updated stagit patch?
>
> Done. I tried to built all the packages in version-control to assure that
> nothing breaks this time ...and it already breaks at
> python2-tempest-lib-0.12.0 with:
> tempest_lib.tests.test_rest_clientNon-zero exit code (2) from test listing.
> error: testr failed (3)
> phase `check' failed after 1.5 seconds
>
> As python2-tempest-lib-0.12.0 is not in
> gnu/packages/version-control.scm, we have a problem there. Someone
> should check this package as  https://hydra.gnu.org/build/1441011 shows
> that it has been failing for some time now, it last build in january.
> https://hydra.gnu.org/build/1441011/nixlog/1/raw
>
> From 41f1a8b707e20c76ff5d04747c0de370ab899521 Mon Sep 17 00:00:00 2001
> From: ng0 
> Date: Wed, 10 Aug 2016 10:04:29 +
> Subject: [PATCH] gnu: Add stagit.
>
> * gnu/packages/version-control.scm (stagit): New variable.
> Import (guix licenses) with "license:" prefix.
> ---
>  gnu/packages/version-control.scm | 83 
> ++--
>  1 file changed, 54 insertions(+), 29 deletions(-)
>
> diff --git a/gnu/packages/version-control.scm 
> b/gnu/packages/version-control.scm
> index 960ed56..7d0a6b0 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -9,6 +9,7 @@
>  ;;; Copyright © 2015, 2016 Efraim Flashner 
>  ;;; Copyright © 2015 Kyle Meyer 
>  ;;; Copyright © 2015 Ricardo Wurmus 
> +;;; Coypright © 2016 ng0 
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -26,10 +27,7 @@
>  ;;; along with GNU Guix.  If not, see .
>  
>  (define-module (gnu packages version-control)
> -  #:use-module ((guix licenses)
> -#:select (asl2.0 bsd-2 bsd-3
> -  gpl1+ gpl2 gpl2+ gpl3+ lgpl2.1
> -  public-domain x11-style))
> +  #:use-module ((guix licenses) #:prefix license:)
>#:use-module (guix utils)
>#:use-module (guix packages)
>#:use-module (guix download)
> @@ -107,7 +105,7 @@
>   "GNU Bazaar is a version control system that allows you to record
>  changes to project files over time.  It supports both a distributed workflow
>  as well as the classic centralized workflow.")
> -(license gpl2+)))
> +(license license:gpl2+)))
>  
>  (define-public git
>;; Keep in sync with 'git-manpages'!
> @@ -275,7 +273,7 @@ as well as the classic centralized workflow.")
> (description
>  "Git is a free distributed version control system designed to handle
>  everything from small to very large projects with speed and efficiency.")
> -   (license gpl2)
> +   (license license:gpl2)
> (home-page "http://git-scm.com/";)))
>  
>  (define-public git-manpages
> @@ -365,7 +363,7 @@ command.")))
>  provided as a re-entrant linkable library with a solid API, allowing you to
>  write native speed custom Git applications in any language with bindings.")
>  ;; GPLv2 with linking exception
> -(license gpl2)))
> +(license license:gpl2)))
>  
>  (define-public cgit
>(package
> @@ -426,7 +424,7 @@ write native speed custom Git applications in any 
> language with bindings.")
>  (description
>   "CGit is an attempt to create a fast web interface for the Git SCM, 
> using
>  a built-in cache to decrease server I/O pressure.")
> -(license gpl2)))
> +(license license:gpl2)))
>  
>  (define-public shflags
>(package
> @@ -470,7 +468,7 @@ different versions of getopt on various OSes make writing 
> portable shell
>  scripts difficult.  shFlags instead provides an API that doesn't change 
> across
>  shell and OS versions so the script writer can be confident that the script
>  will work.")
> -(license lgpl2.1)))
> +(license license:lgpl2.1)))
>  
>  (define-public git-flow
>(package
> @@ -513,7 +511,7 @@ management strategy that helps developers keep track of 
> features, hotfixes,
>  and releases in bigger software projects.  The git-flow library of git
>  subcommands helps au

Re: [PATCH 16/24] gnu: gstreamer: Add qt-gstreamer.

2016-08-17 Thread David Craven
> Is boost propagated due to header references?

The include files reference these headers:

#include 
#include 
#include 
#include 

> what is the reason for disabling runpath validation?

I'm getting a bunch of these errors. The problem seems to be that
/gnu/store/2g5xcc8hp16nfnf37449f3p492m8i03h-qt-gstreamer-1.2.0-1.fc159e5/lib64
isn't in the RUNPATH. But isn't that folder implicitly in the RUNPATH
for libraries in the same directory? How can I get it in the RUNPATH,
is there a better way than using patchelf? what is the reason for
disabling runpath validation?

validating RUNPATH of 7 binaries in
"/gnu/store/2g5xcc8hp16nfnf37449f3p492m8i03h-qt-gstreamer-1.2.0-1.fc159e5/lib64"...
/gnu/store/2g5xcc8hp16nfnf37449f3p492m8i03h-qt-gstreamer-1.2.0-1.fc159e5/lib64/libQt5GStreamer-1.0.so:
error: depends on 'libQt5GLib-2.0.so.0', which cannot be found in
RUNPATH 
("/gnu/store/2g5xcc8hp16nfnf37449f3p492m8i03h-qt-gstreamer-1.2.0-1.fc159e5/lib"
"/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23/lib"
"/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib/lib"
"/gnu/store/l1s4cw9g58hmcpd2qgbckfl228143qzx-glib-2.48.0/lib"
"/gnu/store/gspsx2v3zpfbl2s88xn7kb2ka9gv87bp-gstreamer-1.8.2/lib"
"/gnu/store/cc0192xs2lwcnkpjsv8msqv83d4s9zzv-gst-plugins-base-1.8.2/lib"
"/gnu/store/jz6wxyy2i279w92srv9p3qlabd7y0rjy-qtbase-5.7.0/lib"
"/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib/lib/gcc/x86_64-unknown-linux-gnu/4.9.3/../../..")



Re: QtHaveModule

2016-08-17 Thread 宋文武
David Craven  writes:

> Hi
>
>>> Hi, I just sent a patch to add 'QMAKEPATH' as search-path, which should
>>> fix this issue.
>
>> Thank you! Yes this fixes the issue and is a lot cleaner than what I
>> came up with...
>
> I sent a couple of patches to the mailing list that will require the
> qt and kde packages to be rebuilt (like the update to qt 5.7.0). Do
> you mind if I apply your patch when I push mine, so that we can avoid
> having unnecessary rebuilds?

That's great, yes please push!



Re: [PATCH] gnu: Add minced.

2016-08-17 Thread Ben Woodcroft



On 16/08/16 22:34, Marius Bakke wrote:

Ben Woodcroft  writes:


Hi Marius,

Excellent to see others interested in packaging microbial bioinformatics
tools.

You may want to look here before packaging other microbio tools:

https://github.com/MRC-CLIMB/guix-climb

I'm currently working on upstreaming most of these :)
Cool, and they generally look in quite good shape too. I'll be away next 
week, but I'd be happy to review them after that.



I tried this in a container and it seems that it calls out to a few
programs preventing it from working:

[env]# minced -h
/gnu/store/8asw2i54x53rrwdr8qw4j2rpbkc9fqzz-profile/bin/minced: line 7:
dirname: command not found
/gnu/store/8asw2i54x53rrwdr8qw4j2rpbkc9fqzz-profile/bin/minced: line 9:
dirname: command not found
/gnu/store/8asw2i54x53rrwdr8qw4j2rpbkc9fqzz-profile/bin/minced: line 11:
basename: command not found

So I think that (in order of preference), the source files themselves
should be patched with the absolute paths to these tools, the binary
should be wrapped, or coreutils should be propagated. For the first two
options, coreutils should be an input.

Good catch. Since the "minced" executable is just a wrapper script, I
opted to build my own wrapper to avoid the coreutils dependency.

Good idea.




Now some small comments on the patch itself.


+(arguments
+ `(#:test-target "test"
+   #:phases
+   (modify-phases %standard-phases
+ (delete 'configure)
+ (add-before 'check 'fix-test
+   (lambda _
+ ;; Fix test for latest version.
+ (substitute* "t/Aquifex_aeolicus_VF5.expected"
+   (("minced:0.1.6") "minced:0.2.0"

It might be more future-proof to use '(string-append "minced:"
,version)' instead of hard-coding 0.2.0.

I don't think this will be a problem in future releases. And it can also
cause problems, in case a user sets version to e.g. a commit hash.

OK.

Also, this phase (and the next two) should end in #t since the return
value of substitute* is undefined.



+ (add-before 'install 'qualify-java-path
+   (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "minced"
+   ;; Set full path to java binary in wrapper script.
+   (("^java") (string-append (assoc-ref inputs "jre")
+ "/bin/java")
+ (replace 'install
+   ;; No install target.
+   (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+(bin (string-append out "/bin")))
+   (for-each (lambda (file)
+   (install-file file bin))
+ (list "minced" "minced.jar"
+(native-inputs
+ `(("jdk", icedtea "jdk")))
+(inputs
+ `(("jre", icedtea)))

The commas should go after the space.

Oops, I should stop submitting patches late in the night!


+(home-page"https://github.com/ctSkennerton/minced";)
+(synopsis "Mining CRISPRs in Environmental Datasets")
+(description
+ "MinCED is a program to find Clustered Regularly Interspaced Short
+Palindromic Repeats (CRISPRs) in full genomes or environmental datasets such
+as metagenomes, in which sequence size can be anywhere from 100 to 800 bp.")

That description which you took from the README is a little dated at the
end. How about this?

"MinCED is a program to find Clustered Regularly Interspaced Short
Palindromic Repeats (CRISPRs) in both full genomes and shorter metagenomic 
sequences."

The rest LGTM. Thanks. Can you send an updated patch please?

Please find updated patch below. Thanks for the feedback!


Pushed as '318c0ae' after adding a space in the description and only 
using only using the "out" of icedtea in the inputs.


Thanks.
ben



Re: [PATCH] gnu: Add re2.

2016-08-17 Thread Marius Bakke
Leo Famulari  writes:

> On Mon, Aug 15, 2016 at 02:05:16PM +0100, Marius Bakke wrote:
>> 
>> I wasn't sure where to put this, so went with its own file. It does not
>> fully implement PCRE so pcre.scm seems inappropriate. Perhaps that could
>> be renamed to regex.scm or similar.
>
> The patch looks good, but please put it in regex.scm! But, I don't want
> to move all the regex packages into this new regex module. Perhaps tre,
> since it appears to have no users in our tree.

Moved to regex.scm. Thanks!

>From 137d7ca124c66d23862949228b678a2db1a940b0 Mon Sep 17 00:00:00 2001
From: Marius Bakke 
Date: Sun, 14 Aug 2016 20:16:01 +0100
Subject: [PATCH] gnu: Add re2.

* gnu/packages/regex.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk   |  1 +
 gnu/packages/regex.scm | 57 ++
 2 files changed, 58 insertions(+)
 create mode 100644 gnu/packages/regex.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 7416850..7f4e397 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -297,6 +297,7 @@ GNU_SYSTEM_MODULES =\
   %D%/packages/rdesktop.scm			\
   %D%/packages/rdf.scm\
   %D%/packages/readline.scm			\
+  %D%/packages/regex.scm\
   %D%/packages/rrdtool.scm			\
   %D%/packages/rsync.scm			\
   %D%/packages/ruby.scm\
diff --git a/gnu/packages/regex.scm b/gnu/packages/regex.scm
new file mode 100644
index 000..cea9db8
--- /dev/null
+++ b/gnu/packages/regex.scm
@@ -0,0 +1,57 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Marius Bakke 
+;;;
+;;; 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 .
+
+(define-module (gnu packages regex)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public re2
+   (package
+ (name "re2")
+ (version "2016-08-01")
+ (source (origin
+   (method url-fetch)
+   (uri
+(string-append
+ "https://github.com/google/re2/archive/";
+ version ".tar.gz"))
+   (file-name (string-append name "-" version ".tar.gz"))
+   (sha256
+(base32
+ "06pfm3xi5irrrij85m0c46rsn9jyg1rc2r431wi2knhjvbw9f0bx"
+ (build-system gnu-build-system)
+ (arguments
+  `(#:test-target "test"
+;; There is no configure step, but the Makefile respects a prefix.
+#:make-flags (list (string-append "prefix=" %output))
+#:phases
+(modify-phases %standard-phases
+  (delete 'configure)
+  (add-after 'install 'delete-static-library
+(lambda* (#:key outputs #:allow-other-keys)
+  ;; No make target for shared-only; delete the static version.
+  (delete-file (string-append (assoc-ref outputs "out")
+  "/lib/libre2.a")))
+ (home-page "https://github.com/google/re2";)
+ (synopsis "Fast, safe, thread-friendly regular expression engine")
+ (description "RE2 is a fast, safe, thread-friendly alternative to
+backtracking regular expression engines like those used in PCRE, Perl and
+Python.  It is a C++ library.")
+ (license license:bsd-3)))
-- 
2.9.2



Re: [PATCH 15/24] gnu: gstreamer: Symlink gstconfig.h into include directory.

2016-08-17 Thread David Craven
> In general, we should stick to upstream packaging unless it is clearly
> broken or there is a compelling reason to deviate.  In this case, if an
> application can't find , then it would seem to have a
> buggy build system, and we should fix the problem there.

The qt-gstreamer package doesn't build without this, but I agree that the
problem is with the qt-gstreamer package and not gstreamer and should
therefore be fixed there.



Re: [PATCH 17/24] gnu: kwidgetsaddons: Fix test failure.

2016-08-17 Thread David Craven
> Might (setenv "QT_QPA_PLATFORM" "offscreen") also be enough?

Interesting, that also fixes the problem, but causes a new one...

* Start testing of KDualActionTest *
Config: Using QtTest library 5.7.0, Qt 5.7.0
(x86_64-little_endian-lp64 shared (dynamic) release build; by GCC
4.9.3)
PASS   : KDualActionTest::initTestCase()
PASS   : KDualActionTest::testSetGuiItem()
FAIL!  : KDualActionTest::testSetIconForStates() Compared pointers are
not the same
   Actual   (action.inactiveIcon()): (nil)
   Expected (icon) : 0x65a4d0
   Loc: 
[/tmp/guix-build-kwidgetsaddons-5.24.0.drv-0/kwidgetsaddons-5.24.0/autotests/kdualactiontest.cpp(56)]
PASS   : KDualActionTest::testSetActive()
PASS   : KDualActionTest::testTrigger()
PASS   : KDualActionTest::cleanupTestCase()
Totals: 5 passed, 1 failed, 0 skipped, 0 blacklisted, 3ms
* Finished testing of KDualActionTest *

>  Starting an Xvfb server and then not stopping it again is kinda ... extreme.

Since the tests are run in a container, I'd expect all processes started inside
the container to receive a sigterm when the container is (shutdown?).

> Also, who says that :1 is free?

Again since the tests are run in a container, I'd expect that there
isn't a xserver
running unless I explicitly start it.

Are my assumptions wrong?
Do you think it's worth tracking down the test failure when my solution works?



Re: [PATCH 15/24] gnu: gstreamer: Symlink gstconfig.h into include directory.

2016-08-17 Thread Mark H Weaver
David Craven  writes:

>> What is the reason for this change?  Would it be appropriate to submit a
>> bug report upstream to add this to their "make install"?
>
> The reason is because applications may contain #include ,
> but gstconfig.h was moved to the lib directory because it contains "platform
> specific information".
>
> What do you suggest?

The pkgconfig file for gstreamer, $out/lib/pkgconfig/pkgconfig-1.0.pc,
includes this:

  Cflags: -I${includedir} -I${libdir}/gstreamer-1.0/include

Where ${libdir} is ${prefix}/lib.  So, the include path needed to find
 should automatically be included by non-broken build
systems.

What application(s) are you aware of that are unable to find
?

In general, we should stick to upstream packaging unless it is clearly
broken or there is a compelling reason to deviate.  In this case, if an
application can't find , then it would seem to have a
buggy build system, and we should fix the problem there.

What do you think?

Thanks,
  Mark



Re: [PATCH] gnu: Add libunique.

2016-08-17 Thread ng0
Leo Famulari  writes:

> On Mon, Aug 15, 2016 at 11:33:26PM +, ng0 wrote:
>> Leo Famulari  writes:
>> > Is this package required by something else that we are working on? What
>> > is the use case?
>> 
>> (gnunet-gtk):
>> 
>> (arguments
>>  `(#:configure-flags
>> (list "--without-libunique"
>
> Okay, then I think we should add the package with a comment that says
> it's unmaintained. What do you think of the attached patch?

Looks good to me. This way if some old application should require
libunique, we have it. I'll also ask about libunique at gnunet-devel
list with some other applications I need to question. As far as I
understand Christian, they want to avoid external dependencies where
possible. A ifcase for gnunet-gtk is in the HEAD of gnunet-gtk.

Thanks

> From fa8fbd899756cf948da23e9a29d92a5f48d4eb1c Mon Sep 17 00:00:00 2001
> From: ng0 
> Date: Wed, 3 Aug 2016 08:18:14 +
> Subject: [PATCH] gnu: Add libunique.
>
> * gnu/packages/gnome.scm (libunique): New variable.
>
> Signed-off-by: Leo Famulari 
> ---
>  gnu/packages/gnome.scm | 40 
>  1 file changed, 40 insertions(+)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 4a0be01..b094c30 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -5420,3 +5420,43 @@ GLib/GObject code.")
>   "Libgnomekbd is a keyboard configuration library for the GNOME desktop
>  environment, which can notably display keyboard layouts.")
>  (license license:lgpl2.0+)))
> +
> +;;; This package is no longer maintained:
> +;;; https://wiki.gnome.org/Attic/LibUnique
> +;;; "Unique is now in maintenance mode, and its usage is strongly 
> discouraged.
> +;;; Applications should use the GtkApplication class provided by GTK+ 3.0."
> +(define-public libunique
> +  (package
> +(name "libunique")
> +(version "3.0.2")
> +(source (origin
> +  (method url-fetch)
> +  (uri (string-append "mirror://gnome/sources/" name "/"
> +  (version-major+minor version)  "/"
> +  name "-" version ".tar.xz"))
> +  (sha256
> +   (base32
> +"0f70lkw66v9cj72q0iw1s2546r6bwwcd8idcm3621fg2fgh2rw58"
> +(build-system glib-or-gtk-build-system)
> +(arguments
> + `(#:configure-flags '("--disable-static"
> +   "--disable-dbus" ; use gdbus
> +   "--enable-introspection")))
> +(native-inputs
> + `(("pkg-config" ,pkg-config)
> +   ("gobject-introspection" ,gobject-introspection)
> +   ("glib:bin" ,glib "bin")
> +   ("gtk-doc" ,gtk-doc)))
> +(propagated-inputs
> + ;; Referred to in .h files and .pc.
> + `(("gtk+" ,gtk+)))
> +(home-page "https://wiki.gnome.org/Attic/LibUnique";)
> +(synopsis "Library for writing single instance applications")
> +(description
> + "Libunique is a library for writing single instance applications.  If 
> you
> +launch a single instance application twice, the second instance will either 
> just
> +quit or will send a message to the running instance.  Libunique makes it 
> easy to
> +write this kind of application, by providing a base class, taking care of all
> +the IPC machinery needed to send messages to a running instance, and also
> +handling the startup notification side.")
> +(license license:lgpl2.1+)))
> -- 
> 2.9.3
>

-- 
ng0
For non-prism friendly talk find me on http://www.psyced.org



Re: [PATCH 12/24] gnu: gnome: Add mobile-broadband-provider-info.

2016-08-17 Thread Mark H Weaver
David Craven  writes:

> * gnu/packages/gnome.scm (mobile-broadband-provider-info): New variable.

The summary line to should be "gnu: Add mobile-broadband-provider-info."
without the "gnome: ".  By our conventions, starting a summary line with
"gnu: gnome: " indicates a change to the 'gnome' package, which is not
the case here, and leads to confusion in practice.  I read this summary
line as meaning that 'mobile-broadband-provider-info' was added to
gnome's propagated-inputs.

This same issue applies to the other patches in this patch set as well.
When adding new packages, our convention is simply to write "gnu: Add
."

 Thanks,
   Mark

> ---
>  gnu/packages/gnome.scm | 22 ++
>  1 file changed, 22 insertions(+)
>
> diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
> index 4a0be01..7bc0445 100644
> --- a/gnu/packages/gnome.scm
> +++ b/gnu/packages/gnome.scm
> @@ -21,6 +21,7 @@
>  ;;; Copyright © 2016 Leo Famulari 
>  ;;; Copyright © 2016 Alex Griffin 
>  ;;; Copyright © 2016 ng0 
> +;;; Copyright © 2016 David Craven 
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -4460,6 +4461,27 @@ devices, and provides VPN integration with a variety 
> of different VPN
>  services.")
>  (license license:gpl2+)))
>  
> +(define-public mobile-broadband-provider-info
> +  (package
> +(name "mobile-broadband-provider-info")
> +(version "20151214")
> +(source (origin
> +  (method url-fetch)
> +  (uri (string-append
> +"mirror://gnome/sources/"
> +"mobile-broadband-provider-info/" version "/"
> +"mobile-broadband-provider-info-" version ".tar.xz"))
> +  (sha256
> +   (base32
> +"1905nab1h8p4hx0m1w0rn4mkg9209x680dcr4l77bngy21pmvr4a"
> +(build-system gnu-build-system)
> +(arguments
> + `(#:tests? #f)) ; No tests
> +(home-page "https://wiki.gnome.org/Projects/NetworkManager";)
> +(synopsis "Datbase of broadband connection configuration")
> +(description "Datbase of broadband connection configuration.")
> +(license license:public-domain)))
> +
>  (define-public network-manager-applet
>(package
>  (name "network-manager-applet")



[PATCH 1/1] Go: Update to 1.7

2016-08-17 Thread Petter

Hi,

Made an attempt to update my first package.

Hope it's good!


---
 gnu/packages/golang.scm | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 09d962d..6e15cf6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -185,11 +185,11 @@ garbage collection, various safety features and in 
the style of communicating

 sequential processes (CSP) concurrent programming features added.")
 (license license:bsd-3)))

-(define-public go-1.6
+(define-public go-1.7
   (package
 (inherit go-1.4)
 (name "go")
-(version "1.6.3")
+(version "1.7")
 (source
  (origin
(method url-fetch)
@@ -197,7 +197,7 @@ sequential processes (CSP) concurrent programming 
features added.")

name version ".src.tar.gz"))
(sha256
 (base32
- "002v6irgfd63zp9iza8nski5by0lar033j3ddpqiikw6bznsw9k3"
+ "1h712yd5wk5mrj2dixc9z2xlgksfks00yvglrkrgr488p8b0qs3j"
 (arguments
  (substitute-keyword-arguments (package-arguments go-1.4)
((#:phases phases)
@@ -216,11 +216,14 @@ sequential processes (CSP) concurrent programming 
features added.")
  ;; Removing net/ tests, which fail when attempting to 
access
  ;; network resources not present in the build 
container.

  (for-each delete-file
-   '("net/listen_test.go" "net/parse_test.go"))
+   '("net/listen_test.go"
+ "net/parse_test.go"
+ "net/cgo_unix_test.go"))

  (substitute* "os/os_test.go"
(("/usr/bin") (getcwd))
-   (("/bin/pwd") (which "pwd")))
+   (("/bin/pwd") (which "pwd"))
+   (("/bin/sh") (which "sh")))

  ;; Add libgcc to runpath
  (substitute* "cmd/link/internal/ld/lib.go"
@@ -275,7 +278,7 @@ sequential processes (CSP) concurrent programming 
features added.")


  ;; fix shebang for testar script
  ;; note the target script is generated at build time.
- (substitute* "../misc/cgo/testcarchive/test.bash"
+ (substitute* 
"../misc/cgo/testcarchive/carchive_test.go"
(("#!/usr/bin/env") (string-append "#!" (which 
"env"


  (substitute* "net/lookup_unix.go"
@@ -336,4 +339,4 @@ sequential processes (CSP) concurrent programming 
features added.")

  `(("go" ,go-1.4)
,@(package-native-inputs go-1.4)

-(define-public go go-1.6)
+(define-public go go-1.7)
--
2.9.3





Re: [PATCH 12/24] gnu: gnome: Add mobile-broadband-provider-info.

2016-08-17 Thread David Craven
> This same issue applies to the other patches in this patch set as well.
> When adding new packages, our convention is simply to write "gnu: Add
> ."

:thumbs up:



Re: [PATCH 15/24] gnu: gstreamer: Symlink gstconfig.h into include directory.

2016-08-17 Thread David Craven
> What is the reason for this change?  Would it be appropriate to submit a
> bug report upstream to add this to their "make install"?

The reason is because applications may contain #include ,
but gstconfig.h was moved to the lib directory because it contains "platform
specific information".

What do you suggest?



Re: [PATCH 10/24] gnu: networkmanager-qt: Propagate network-manager.

2016-08-17 Thread David Craven
> Also there should be a reason for propagating (probably written as a
> comment).  Ideally it should be avoided.

I added comments:

(propagated-inputs
  ; Headers contain #include  and
  ;#include 
  `(("network-manager" ,network-manager)))

(propagated-inputs
 ; Headers contain #include 
 `(("modem-manager", modem-manager)))



Re: [PATCH 15/24] gnu: gstreamer: Symlink gstconfig.h into include directory.

2016-08-17 Thread Mark H Weaver
David Craven  writes:

> * gnu/packages/gstreamer.scm (gstreamer)[arguments]: Add symlink-gstconfig.h
>   phase.

What is the reason for this change?  Would it be appropriate to submit a
bug report upstream to add this to their "make install"?

  Mark
  

> ---
>  gnu/packages/gstreamer.scm | 11 ++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm
> index bd99880..54919cd 100644
> --- a/gnu/packages/gstreamer.scm
> +++ b/gnu/packages/gstreamer.scm
> @@ -113,7 +113,16 @@ arrays of data.")
>   `(#:configure-flags
> (list (string-append "--with-html-dir="
>  (assoc-ref %outputs "doc")
> -"/share/gtk-doc/html"
> +"/share/gtk-doc/html"))
> +   #:phases
> +(modify-phases %standard-phases
> +  (add-after 'install 'symlink-gstconfig.h
> +(lambda* (#:key outputs #:allow-other-keys)
> +  (symlink
> +(string-append (assoc-ref outputs "out")
> + "/lib/gstreamer-1.0/include/gst/gstconfig.h")
> +(string-append (assoc-ref outputs "out")
> + "/include/gstreamer-1.0/gst/gstconfig.h")))
>  (propagated-inputs `(("glib" ,glib))) ; required by gstreamer-1.0.pc.
>  (native-inputs
>   `(("bison" ,bison)



Re: [PATCH 14/24] gnu: gstreamer: Use license: prefix.

2016-08-17 Thread David Craven
> That would be a massive refactoring - but can be done eventually.

I don't think it would be too hard, most work can be done through
applying a regex to the entire project and running the testsuite to
find the cases where it didn't work. I did this on the python.scm
file...

So then I'll leave the patch as it is?



Re: [PATCH 14/24] gnu: gstreamer: Use license: prefix.

2016-08-17 Thread Danny Milosavljevic
On Wed, 17 Aug 2016 10:53:23 +0200
David Craven  wrote:

> Ah, I was thinking more about lgpl2.1+ and the sorts... So is it a
> good idea to prefix all licenses in guix licenses itself (as Eric
> mentioned), and be done with it?

That would be a massive refactoring - but can be done eventually.

I would just #:prefix license: whenever one touches something that caused these 
problems. No need to modify everything in one go.



Re: [PATCH 5/5] gnu: Add arduino-makefile.

2016-08-17 Thread Danny Milosavljevic
> Should this not point to /gnu/store/...-python-3...?  If not, it could
> probably be left alone, since any package built with it will presumably
> have its shebangs patched.

It's just that Python 3 is incompatible with Python 2 but the source code has 
no marker in the file - so patch-shebang would have to use a crystal ball, tea 
leaves or whatever to find out it is indeed Python 3. I expect that 
patch-shebang will then see python3 and correct it - and it does.

> You can use 'install-file' from (guix build utils) here to remove much
> of the repitition.

Ah, nice!

> > +;(supported-systems '("avr"))  
> 
> You can remove this comment.

I wouldn't. It's nice to see that it's for AVR even if we don't use the whole 
target machinery (I tried invoking "guix build --target=avr" before and it 
rebuilt half the universe - not sure why. There are not many non-native inputs 
and the native inputs are... native).

> I don't have an arduino to test this package on.  Can anyone else help
> with this?

You can still test the compilation and linkage.

My Makefile to test this looks like this:

ARCHITECTURE = avr
BOARD_TAG= uno

# shouldn't be necessary but is
CPPFLAGS += -I${HOME}/.guix-profile/avr/include

# shouldn't be necessary but is. The "-L" flag order matters.
LDFLAGS += -L${HOME}/.guix-profile/avr/lib/avr5 -L${HOME}/.guix-profile/avr/lib 
-B${HOME}/.guix-profile/avr/lib

include 
/gnu/store/k21m6b7c8bmzxk5x73zqm0qaz769lx2d-arduino-makefile-1.5.1/share/arduino/Arduino.mk

Then create a file Blink.ino in the same directory which contains:

void setup() {
}

void loop() {
}

Then run

$ make



Re: [PATCH 14/24] gnu: gstreamer: Use license: prefix.

2016-08-17 Thread David Craven
> Expat causes a name collision.
>
> Also nmap, boost, cecill-c, freetype, imlib2, openldap2.0, openssl, ruby, 
> tcl/tk, vim, x11, zlib.
>
> Should there be new licenses it's a good guess it will be named like the 
> package it originated in.
>
> I would not advise removing the prefix. If anything, use it everywhere.

Ah, I was thinking more about lgpl2.1+ and the sorts... So is it a
good idea to prefix all licenses in guix licenses itself (as Eric
mentioned), and be done with it?



Re: [PATCH 14/24] gnu: gstreamer: Use license: prefix.

2016-08-17 Thread Danny Milosavljevic
On Wed, 17 Aug 2016 10:02:26 +0200
David Craven  wrote:

> I wonder who started the #:prefix/#:select thing in the first place. I
> don't think that anything from guix licenses is likely to cause a name
> collision. Maybe it's best to remove the #:prefix entirely?

Expat causes a name collision. 

Also nmap, boost, cecill-c, freetype, imlib2, openldap2.0, openssl, ruby, 
tcl/tk, vim, x11, zlib.

Should there be new licenses it's a good guess it will be named like the 
package it originated in.

I would not advise removing the prefix. If anything, use it everywhere.



Re: [PATCH 09/24] gnu: freedesktop: Add wayland-protocols.

2016-08-17 Thread David Craven
Wayland protocols only contains xml definitions, so the description is accurate:

find /gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/pkgconfig
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/pkgconfig/wayland-protocols.pc
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/fullscreen-shell
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/fullscreen-shell/fullscreen-shell-unstable-v1.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/input-method
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/input-method/input-method-unstable-v1.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/tablet
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/tablet/tablet-unstable-v1.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/relative-pointer
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/relative-pointer/relative-pointer-unstable-v1.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/xdg-shell
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/xdg-shell/xdg-shell-unstable-v5.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/linux-dmabuf
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/linux-dmabuf/linux-dmabuf-unstable-v1.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/pointer-constraints
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/pointer-gestures
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/text-input
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/unstable/text-input/text-input-unstable-v1.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/stable
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/stable/viewporter
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/stable/viewporter/viewporter.xml
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/stable/presentation-time
/gnu/store/fy5lg7x7ln92gnb0da5nvkz0zswrf5z4-wayland-protocols-1.4/share/wayland-protocols/stable/presentation-time/presentation-time.xml



Re: [PATCH 08/24] gnu: xorg: Add lndir.

2016-08-17 Thread David Craven
> The patch looks good to me, except the indentation of this
>
> (string-append ...).  I usually write 'source' fields like this:
>
>(source (origin
>  (method url-fetch)
>  (uri (string-append "mirror://xorg/individual/util/lndir-"
>  version ".tar.bz2"))
>  (sha256
>   (base32
>"0pdngiy8zdhsiqx2am75yfcl36l7kd7d7nl0rss8shcdvsqgmx29"
>
> But this is not a big deal, of course :-)

I prefer
(uri (string-append
"mirror://xorg/individual/util/"
"lndir-" version ".tar.bz2"))

But in this case I thought that keeping consistent with how it was
done in the xorg.scm file was more important than my preference. What
do you think?



Re: [PATCH 07/24] gnu: compression: Add snappy.

2016-08-17 Thread David Craven
> Also there is a real release that shouldn't require autoreconf phase:
> 
> Did you try using it?

Just did, and requires running autoreconf too...



Re: [PATCH 14/24] gnu: gstreamer: Use license: prefix.

2016-08-17 Thread David Craven
I wonder who started the #:prefix/#:select thing in the first place. I
don't think that anything from guix licenses is likely to cause a name
collision. Maybe it's best to remove the #:prefix entirely?



Re: [PATCH 0/1] Perl 5.24.0 update

2016-08-17 Thread Ricardo Wurmus

Leo Famulari  writes:

> On Tue, Aug 16, 2016 at 06:43:57PM -0400, Leo Famulari wrote:
>> And the perl-no-build-time patch deactivated the code that embedded the
>> compilation timestamp that is normally printed by `perl -V`. Perl 5.24.0
>> can take this value from the macro PERL_BUILD_DATE [2], so I removed the
>> old patch and added perl-reproducible-build-date.patch.
>> 
>> I don't love this patch... we could instead do something like what
>> happens in the Erlang package. There we instead get SOURCE_DATE_EPOCH
>> from the environment and do some format string transformations to make a
>> pretty date string.
>
> We could also just keep the perl-no-build-time patch in place. There is
> not much point in doing work just to make `perl -V` print a nonsense
> date (Unix epoch) IMO.

What you sent looks good.  It is important to let “perl -V” print a date
(even if it is useless) to avoid breaking third-party software that
expects a date to be printed.

Your patch to just define the date as the epoch seems fine to me.

~~ Ricardo