Merge branch 'master' into core-updates
This commit is contained in:
		
						commit
						023dd28a30
					
				
					 53 changed files with 2364 additions and 114 deletions
				
			
		| 
						 | 
				
			
			@ -82,6 +82,7 @@ MODULES =					\
 | 
			
		|||
  guix/build/cvs.scm				\
 | 
			
		||||
  guix/build/svn.scm				\
 | 
			
		||||
  guix/build/syscalls.scm			\
 | 
			
		||||
  guix/build/gremlin.scm			\
 | 
			
		||||
  guix/build/emacs-utils.scm			\
 | 
			
		||||
  guix/build/graft.scm				\
 | 
			
		||||
  guix/packages.scm				\
 | 
			
		||||
| 
						 | 
				
			
			@ -178,6 +179,7 @@ SCM_TESTS =					\
 | 
			
		|||
  tests/union.scm				\
 | 
			
		||||
  tests/profiles.scm				\
 | 
			
		||||
  tests/syscalls.scm				\
 | 
			
		||||
  tests/gremlin.scm				\
 | 
			
		||||
  tests/lint.scm
 | 
			
		||||
 | 
			
		||||
if HAVE_GUILE_JSON
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -154,6 +154,7 @@ Services
 | 
			
		|||
* Base Services::               Essential system services.
 | 
			
		||||
* Networking Services::         Network setup, SSH daemon, etc.
 | 
			
		||||
* X Window::                    Graphical display.
 | 
			
		||||
* Various Services::            Other services.
 | 
			
		||||
 | 
			
		||||
Packaging Guidelines
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -2489,13 +2490,9 @@ Gexps are meant to be written to a file and run or manipulated by other
 | 
			
		|||
processes.
 | 
			
		||||
 | 
			
		||||
@item
 | 
			
		||||
When a package or derivation is unquoted inside a gexp, the result is as
 | 
			
		||||
if its output file name had been introduced.
 | 
			
		||||
 | 
			
		||||
Actually this mechanism is not limited to package and derivation
 | 
			
		||||
objects; @dfn{compilers} able to ``lower'' other high-level objects to
 | 
			
		||||
derivations can be defined, such that these objects can also be inserted
 | 
			
		||||
into gexps.
 | 
			
		||||
When a high-level object such as a package or derivation is unquoted
 | 
			
		||||
inside a gexp, the result is as if its output file name had been
 | 
			
		||||
introduced.
 | 
			
		||||
 | 
			
		||||
@item
 | 
			
		||||
Gexps carry information about the packages or derivations they refer to,
 | 
			
		||||
| 
						 | 
				
			
			@ -2503,6 +2500,14 @@ and these dependencies are automatically added as inputs to the build
 | 
			
		|||
processes that use them.
 | 
			
		||||
@end itemize
 | 
			
		||||
 | 
			
		||||
Actually this mechanism is not limited to package and derivation
 | 
			
		||||
objects; @dfn{compilers} able to ``lower'' other high-level objects to
 | 
			
		||||
derivations can be defined, such that these objects can also be inserted
 | 
			
		||||
into gexps.  Another useful type of high-level object that can be
 | 
			
		||||
inserted in a gexp is @dfn{local files}, which allows files from the
 | 
			
		||||
local file system to be added to the store and referred to by
 | 
			
		||||
derivations and such (see @code{local-file} below.)
 | 
			
		||||
 | 
			
		||||
To illustrate the idea, here is an example of a gexp:
 | 
			
		||||
 | 
			
		||||
@example
 | 
			
		||||
| 
						 | 
				
			
			@ -2562,24 +2567,24 @@ or more of the following forms:
 | 
			
		|||
@table @code
 | 
			
		||||
@item #$@var{obj}
 | 
			
		||||
@itemx (ungexp @var{obj})
 | 
			
		||||
Introduce a reference to @var{obj}.  @var{obj} may be a package or a
 | 
			
		||||
Introduce a reference to @var{obj}.  @var{obj} may have one of the
 | 
			
		||||
supported types, for example a package or a
 | 
			
		||||
derivation, in which case the @code{ungexp} form is replaced by its
 | 
			
		||||
output file name---e.g., @code{"/gnu/store/@dots{}-coreutils-8.22}.
 | 
			
		||||
 | 
			
		||||
If @var{obj} is a list, it is traversed and any package or derivation
 | 
			
		||||
references are substituted similarly.
 | 
			
		||||
If @var{obj} is a list, it is traversed and references to supported
 | 
			
		||||
objects are substituted similarly.
 | 
			
		||||
 | 
			
		||||
If @var{obj} is another gexp, its contents are inserted and its
 | 
			
		||||
dependencies are added to those of the containing gexp.
 | 
			
		||||
 | 
			
		||||
If @var{obj} is another kind of object, it is inserted as is.
 | 
			
		||||
 | 
			
		||||
@item #$@var{package-or-derivation}:@var{output}
 | 
			
		||||
@itemx (ungexp @var{package-or-derivation} @var{output})
 | 
			
		||||
@item #$@var{obj}:@var{output}
 | 
			
		||||
@itemx (ungexp @var{obj} @var{output})
 | 
			
		||||
This is like the form above, but referring explicitly to the
 | 
			
		||||
@var{output} of @var{package-or-derivation}---this is useful when
 | 
			
		||||
@var{package-or-derivation} produces multiple outputs (@pxref{Packages
 | 
			
		||||
with Multiple Outputs}).
 | 
			
		||||
@var{output} of @var{obj}---this is useful when @var{obj} produces
 | 
			
		||||
multiple outputs (@pxref{Packages with Multiple Outputs}).
 | 
			
		||||
 | 
			
		||||
@item #+@var{obj}
 | 
			
		||||
@itemx #+@var{obj}:output
 | 
			
		||||
| 
						 | 
				
			
			@ -2664,6 +2669,20 @@ refer to.  Any reference to another store item will lead to a build error.
 | 
			
		|||
The other arguments are as for @code{derivation} (@pxref{Derivations}).
 | 
			
		||||
@end deffn
 | 
			
		||||
 | 
			
		||||
@deffn {Scheme Procedure} local-file @var{file} [@var{name}] @
 | 
			
		||||
   [#:recursive? #t]
 | 
			
		||||
Return an object representing local file @var{file} to add to the store; this
 | 
			
		||||
object can be used in a gexp.  @var{file} will be added to the store under @var{name}--by
 | 
			
		||||
default the base name of @var{file}.
 | 
			
		||||
 | 
			
		||||
When @var{recursive?} is true, the contents of @var{file} are added recursively; if @var{file}
 | 
			
		||||
designates a flat file and @var{recursive?} is true, its contents are added, and its
 | 
			
		||||
permission bits are kept.
 | 
			
		||||
 | 
			
		||||
This is the declarative counterpart of the @code{interned-file} monadic
 | 
			
		||||
procedure (@pxref{The Store Monad, @code{interned-file}}).
 | 
			
		||||
@end deffn
 | 
			
		||||
 | 
			
		||||
@deffn {Monadic Procedure} gexp->script @var{name} @var{exp}
 | 
			
		||||
Return an executable script @var{name} that runs @var{exp} using
 | 
			
		||||
@var{guile} with @var{modules} in its search path.
 | 
			
		||||
| 
						 | 
				
			
			@ -2701,8 +2720,9 @@ or a subset thereof.
 | 
			
		|||
@deffn {Monadic Procedure} text-file* @var{name} @var{text} @dots{}
 | 
			
		||||
Return as a monadic value a derivation that builds a text file
 | 
			
		||||
containing all of @var{text}.  @var{text} may list, in addition to
 | 
			
		||||
strings, packages, derivations, and store file names; the resulting
 | 
			
		||||
store file holds references to all these.
 | 
			
		||||
strings, objects of any type that can be used in a gexp: packages,
 | 
			
		||||
derivations, local file objects, etc.  The resulting store file holds
 | 
			
		||||
references to all these.
 | 
			
		||||
 | 
			
		||||
This variant should be preferred over @code{text-file} anytime the file
 | 
			
		||||
to create will reference items from the store.  This is typically the
 | 
			
		||||
| 
						 | 
				
			
			@ -4350,6 +4370,7 @@ declaration.
 | 
			
		|||
* Base Services::               Essential system services.
 | 
			
		||||
* Networking Services::         Network setup, SSH daemon, etc.
 | 
			
		||||
* X Window::                    Graphical display.
 | 
			
		||||
* Various Services::            Other services.
 | 
			
		||||
@end menu
 | 
			
		||||
 | 
			
		||||
@node Base Services
 | 
			
		||||
| 
						 | 
				
			
			@ -4686,6 +4707,25 @@ appropriate screen resolution; otherwise, it must be a list of
 | 
			
		|||
resolutions---e.g., @code{((1024 768) (640 480))}.
 | 
			
		||||
@end deffn
 | 
			
		||||
 | 
			
		||||
@node Various Services
 | 
			
		||||
@subsubsection Various Services
 | 
			
		||||
 | 
			
		||||
The @code{(gnu services lirc)} module provides the following service.
 | 
			
		||||
 | 
			
		||||
@deffn {Monadic Procedure} lirc-service [#:lirc lirc] @
 | 
			
		||||
       [#:device #f] [#:driver #f] [#:config-file #f] @
 | 
			
		||||
       [#:extra-options '()]
 | 
			
		||||
Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that
 | 
			
		||||
decodes infrared signals from remote controls.
 | 
			
		||||
 | 
			
		||||
Optionally, @var{device}, @var{driver} and @var{config-file}
 | 
			
		||||
(configuration file name) may be specified.  See @command{lircd} manual
 | 
			
		||||
for details.
 | 
			
		||||
 | 
			
		||||
Finally, @var{extra-options} is a list of additional command-line options
 | 
			
		||||
passed to @command{lircd}.
 | 
			
		||||
@end deffn
 | 
			
		||||
 | 
			
		||||
@node Setuid Programs
 | 
			
		||||
@subsection Setuid Programs
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,6 +38,7 @@ GNU_SYSTEM_MODULES =				\
 | 
			
		|||
  gnu/packages/asciidoc.scm			\
 | 
			
		||||
  gnu/packages/aspell.scm			\
 | 
			
		||||
  gnu/packages/attr.scm				\
 | 
			
		||||
  gnu/packages/audacity.scm			\
 | 
			
		||||
  gnu/packages/audio.scm			\
 | 
			
		||||
  gnu/packages/autogen.scm			\
 | 
			
		||||
  gnu/packages/autotools.scm			\
 | 
			
		||||
| 
						 | 
				
			
			@ -146,6 +147,7 @@ GNU_SYSTEM_MODULES =				\
 | 
			
		|||
  gnu/packages/haskell.scm			\
 | 
			
		||||
  gnu/packages/hugs.scm				\
 | 
			
		||||
  gnu/packages/hurd.scm				\
 | 
			
		||||
  gnu/packages/ibus.scm				\
 | 
			
		||||
  gnu/packages/icu4c.scm			\
 | 
			
		||||
  gnu/packages/idutils.scm			\
 | 
			
		||||
  gnu/packages/image.scm			\
 | 
			
		||||
| 
						 | 
				
			
			@ -180,6 +182,7 @@ GNU_SYSTEM_MODULES =				\
 | 
			
		|||
  gnu/packages/lightning.scm			\
 | 
			
		||||
  gnu/packages/links.scm			\
 | 
			
		||||
  gnu/packages/linux.scm			\
 | 
			
		||||
  gnu/packages/lirc.scm				\
 | 
			
		||||
  gnu/packages/lisp.scm				\
 | 
			
		||||
  gnu/packages/llvm.scm				\
 | 
			
		||||
  gnu/packages/lout.scm				\
 | 
			
		||||
| 
						 | 
				
			
			@ -219,7 +222,7 @@ GNU_SYSTEM_MODULES =				\
 | 
			
		|||
  gnu/packages/nutrition.scm			\
 | 
			
		||||
  gnu/packages/nvi.scm				\
 | 
			
		||||
  gnu/packages/ocaml.scm			\
 | 
			
		||||
  gnu/packages/ocrad.scm			\
 | 
			
		||||
  gnu/packages/ocr.scm				\
 | 
			
		||||
  gnu/packages/onc-rpc.scm			\
 | 
			
		||||
  gnu/packages/openbox.scm			\
 | 
			
		||||
  gnu/packages/openldap.scm			\
 | 
			
		||||
| 
						 | 
				
			
			@ -323,6 +326,7 @@ GNU_SYSTEM_MODULES =				\
 | 
			
		|||
  gnu/services/base.scm				\
 | 
			
		||||
  gnu/services/dbus.scm				\
 | 
			
		||||
  gnu/services/dmd.scm				\
 | 
			
		||||
  gnu/services/lirc.scm				\
 | 
			
		||||
  gnu/services/networking.scm			\
 | 
			
		||||
  gnu/services/ssh.scm				\
 | 
			
		||||
  gnu/services/xorg.scm				\
 | 
			
		||||
| 
						 | 
				
			
			@ -366,6 +370,7 @@ dist_patch_DATA =						\
 | 
			
		|||
  gnu/packages/patches/ath9k-htc-firmware-binutils.patch	\
 | 
			
		||||
  gnu/packages/patches/ath9k-htc-firmware-gcc.patch		\
 | 
			
		||||
  gnu/packages/patches/ath9k-htc-firmware-objcopy.patch		\
 | 
			
		||||
  gnu/packages/patches/audacity-fix-ffmpeg-binding.patch	\
 | 
			
		||||
  gnu/packages/patches/automake-skip-amhello-tests.patch	\
 | 
			
		||||
  gnu/packages/patches/avahi-localstatedir.patch		\
 | 
			
		||||
  gnu/packages/patches/avrdude-fix-libusb.patch			\
 | 
			
		||||
| 
						 | 
				
			
			@ -432,6 +437,13 @@ dist_patch_DATA =						\
 | 
			
		|||
  gnu/packages/patches/guix-test-networking.patch		\
 | 
			
		||||
  gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \
 | 
			
		||||
  gnu/packages/patches/hop-bigloo-4.0b.patch			\
 | 
			
		||||
  gnu/packages/patches/icecat-bug-1127780.patch			\
 | 
			
		||||
  gnu/packages/patches/icecat-bug-1144991.patch			\
 | 
			
		||||
  gnu/packages/patches/icecat-bug-1145870.patch			\
 | 
			
		||||
  gnu/packages/patches/icecat-bug-1146339.patch			\
 | 
			
		||||
  gnu/packages/patches/icecat-CVE-2015-0817.patch		\
 | 
			
		||||
  gnu/packages/patches/icecat-CVE-2015-0818-pt1.patch		\
 | 
			
		||||
  gnu/packages/patches/icecat-CVE-2015-0818-pt2.patch		\
 | 
			
		||||
  gnu/packages/patches/irrlicht-mesa-10.patch			\
 | 
			
		||||
  gnu/packages/patches/jbig2dec-ignore-testtest.patch		\
 | 
			
		||||
  gnu/packages/patches/kmod-module-directory.patch		\
 | 
			
		||||
| 
						 | 
				
			
			@ -451,6 +463,7 @@ dist_patch_DATA =						\
 | 
			
		|||
  gnu/packages/patches/libvpx-fix-armhf-link.patch		\
 | 
			
		||||
  gnu/packages/patches/libvpx-fix-ssse3-quantize.patch		\
 | 
			
		||||
  gnu/packages/patches/libvpx-vp9-out-of-bounds-access.patch	\
 | 
			
		||||
  gnu/packages/patches/lirc-localstatedir.patch			\
 | 
			
		||||
  gnu/packages/patches/lm-sensors-hwmon-attrs.patch		\
 | 
			
		||||
  gnu/packages/patches/lua51-liblua-so.patch                    \
 | 
			
		||||
  gnu/packages/patches/luajit-no_ldconfig.patch			\
 | 
			
		||||
| 
						 | 
				
			
			@ -488,6 +501,7 @@ dist_patch_DATA =						\
 | 
			
		|||
  gnu/packages/patches/pingus-sdl-libs-config.patch		\
 | 
			
		||||
  gnu/packages/patches/plotutils-libpng-jmpbuf.patch		\
 | 
			
		||||
  gnu/packages/patches/polkit-drop-test.patch			\
 | 
			
		||||
  gnu/packages/patches/portaudio-audacity-compat.patch		\
 | 
			
		||||
  gnu/packages/patches/procps-make-3.82.patch			\
 | 
			
		||||
  gnu/packages/patches/pulseaudio-fix-mult-test.patch		\
 | 
			
		||||
  gnu/packages/patches/pybugz-encode-error.patch		\
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
| 
						 | 
				
			
			@ -118,6 +118,7 @@ STORE."
 | 
			
		|||
 | 
			
		||||
    (directory "/bin")
 | 
			
		||||
    (directory "/tmp" 0 0 #o1777)                 ; sticky bit
 | 
			
		||||
    (directory "/var/tmp" 0 0 #o1777)
 | 
			
		||||
 | 
			
		||||
    (directory "/root" 0 0)                       ; an exception
 | 
			
		||||
    (directory "/home" 0 0)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -783,7 +783,15 @@ This package provides the 'wpa_supplicant' daemon and the 'wpa_cli' command.")
 | 
			
		|||
      CONFIG_CTRL_IFACE_DBUS_INTRO=y\n" port)
 | 
			
		||||
              (close-port port))
 | 
			
		||||
            #t)
 | 
			
		||||
          ,phases))))))
 | 
			
		||||
          (alist-cons-after
 | 
			
		||||
           'install-man-pages 'install-dbus-conf
 | 
			
		||||
           (lambda* (#:key outputs #:allow-other-keys)
 | 
			
		||||
             (let* ((out (assoc-ref outputs "out"))
 | 
			
		||||
                    (dir (string-append out "/etc/dbus-1/system.d")))
 | 
			
		||||
               (mkdir-p dir)
 | 
			
		||||
               (copy-file "dbus/dbus-wpa_supplicant.conf"
 | 
			
		||||
                          (string-append dir "/wpa_supplicant.conf"))))
 | 
			
		||||
           ,phases)))))))
 | 
			
		||||
 | 
			
		||||
(define-public wakelan
 | 
			
		||||
  (package
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										102
									
								
								gnu/packages/audacity.scm
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										102
									
								
								gnu/packages/audacity.scm
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,102 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
 | 
			
		||||
;;; under the terms of the GNU General Public License as published by
 | 
			
		||||
;;; the Free Software Foundation; either version 3 of the License, or (at
 | 
			
		||||
;;; your option) any later version.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is distributed in the hope that it will be useful, but
 | 
			
		||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
;;; GNU General Public License for more details.
 | 
			
		||||
;;;
 | 
			
		||||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (gnu packages audacity)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module ((guix licenses) #:prefix license:)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module (gnu packages)
 | 
			
		||||
  #:use-module (gnu packages audio)
 | 
			
		||||
  #:use-module (gnu packages base)
 | 
			
		||||
  #:use-module (gnu packages gtk)
 | 
			
		||||
  #:use-module (gnu packages linux)
 | 
			
		||||
  #:use-module (gnu packages mp3)
 | 
			
		||||
  #:use-module (gnu packages pkg-config)
 | 
			
		||||
  #:use-module (gnu packages pulseaudio)
 | 
			
		||||
  #:use-module (gnu packages python)
 | 
			
		||||
  #:use-module (gnu packages xiph)
 | 
			
		||||
  #:use-module (gnu packages xml)
 | 
			
		||||
  #:use-module (gnu packages video)
 | 
			
		||||
  #:use-module (gnu packages wxwidgets))
 | 
			
		||||
 | 
			
		||||
(define-public audacity
 | 
			
		||||
  (package
 | 
			
		||||
    (name "audacity")
 | 
			
		||||
    (version "2.1.0")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri
 | 
			
		||||
        (string-append
 | 
			
		||||
         "mirror://sourceforge/audacity/audacity-minsrc-" version ".tar.xz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "1cs2w3fwqylpqmfwkvlgdx5lhclpckfil7pqibl37qlbnf4qvndh"))
 | 
			
		||||
       (patches (list (search-patch "audacity-fix-ffmpeg-binding.patch")))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (inputs
 | 
			
		||||
     ;; TODO: Add portSMF and libwidgetextra once they're packaged.  In-tree
 | 
			
		||||
     ;; versions shipping with Audacity are used for now.
 | 
			
		||||
     `(("wxwidgets" ,wxwidgets-2)
 | 
			
		||||
       ("gtk" ,gtk+-2)
 | 
			
		||||
       ("alsa-lib" ,alsa-lib)
 | 
			
		||||
       ("jack" ,jack-2)
 | 
			
		||||
       ("expat" ,expat)
 | 
			
		||||
       ("ffmpeg" ,ffmpeg)
 | 
			
		||||
       ("lame" ,lame)
 | 
			
		||||
       ("flac" ,flac)
 | 
			
		||||
       ("libid3tag" ,libid3tag)
 | 
			
		||||
       ("libmad" ,libmad)
 | 
			
		||||
       ("libsbsms" ,libsbsms)
 | 
			
		||||
       ("libsndfile" ,libsndfile)
 | 
			
		||||
       ("soundtouch" ,soundtouch)
 | 
			
		||||
       ("soxr" ,soxr)                   ;replaces libsamplerate
 | 
			
		||||
       ("twolame" ,twolame)
 | 
			
		||||
       ("vamp" ,vamp)
 | 
			
		||||
       ("libvorbis" ,libvorbis)
 | 
			
		||||
       ("lv2" ,lv2)
 | 
			
		||||
       ("lilv" ,lilv)
 | 
			
		||||
       ("portaudio" ,portaudio)))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("pkg-config" ,pkg-config)
 | 
			
		||||
       ("python" ,python-2)
 | 
			
		||||
       ("which" ,which)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:configure-flags
 | 
			
		||||
       (let ((libid3tag (assoc-ref %build-inputs "libid3tag"))
 | 
			
		||||
             (libmad (assoc-ref %build-inputs "libmad")))
 | 
			
		||||
         (list
 | 
			
		||||
          ;; Loading FFmpeg dynamically is problematic.
 | 
			
		||||
          "--disable-dynamic-loading"
 | 
			
		||||
          ;; libid3tag and libmad provide no .pc files, so pkg-config fails to
 | 
			
		||||
          ;; find them.  Force their inclusion.
 | 
			
		||||
          (string-append "ID3TAG_CFLAGS=-I" libid3tag "/include")
 | 
			
		||||
          (string-append "ID3TAG_LIBS=-L" libid3tag "/lib -lid3tag -lz")
 | 
			
		||||
          (string-append "LIBMAD_CFLAGS=-I" libmad "/include")
 | 
			
		||||
          (string-append "LIBMAD_LIBS=-L" libmad "/lib -lmad")))
 | 
			
		||||
       ;; The test suite is not "well exercised" according to the developers,
 | 
			
		||||
       ;; and fails with various errors.  See
 | 
			
		||||
       ;; <http://sourceforge.net/p/audacity/mailman/message/33524292/>.
 | 
			
		||||
       #:tests? #f))
 | 
			
		||||
    (home-page "http://audacity.sourceforge.net/")
 | 
			
		||||
    (synopsis "Software for recording and editing sounds")
 | 
			
		||||
    (description
 | 
			
		||||
     "Audacity is a multi-track audio editor designed for recording, playing
 | 
			
		||||
and editing digital audio.  It features digital effects and spectrum analysis
 | 
			
		||||
tools.")
 | 
			
		||||
    (license license:gpl2+)))
 | 
			
		||||
| 
						 | 
				
			
			@ -1088,15 +1088,28 @@ portions of LAME.")
 | 
			
		|||
             (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
 | 
			
		||||
             ".tgz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "0mwddk4qzybaf85wqfhxqlf0c5im9il8z03rd4n127k8y2jj9q4g"))))
 | 
			
		||||
        (base32 "0mwddk4qzybaf85wqfhxqlf0c5im9il8z03rd4n127k8y2jj9q4g"))
 | 
			
		||||
       (patches (list (search-patch "portaudio-audacity-compat.patch")))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (inputs
 | 
			
		||||
     ;; TODO: Add ASIHPI.
 | 
			
		||||
     `(("alsa-lib" ,alsa-lib)
 | 
			
		||||
       ("jack" ,jack-2)))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("pkg-config" ,pkg-config)))
 | 
			
		||||
    (arguments '(#:tests? #f))          ;no 'check' target
 | 
			
		||||
     `(("autoconf" ,autoconf)
 | 
			
		||||
       ("automake" ,automake)
 | 
			
		||||
       ("libtool" ,libtool)
 | 
			
		||||
       ("pkg-config" ,pkg-config)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:phases
 | 
			
		||||
       ;; Autoreconf is necessary because the audacity-compat patch modifies
 | 
			
		||||
       ;; .in files.
 | 
			
		||||
       (alist-cons-after
 | 
			
		||||
        'unpack 'autoreconf
 | 
			
		||||
        (lambda _
 | 
			
		||||
          (zero? (system* "autoreconf" "-vif")))
 | 
			
		||||
        %standard-phases)
 | 
			
		||||
       #:tests? #f))                    ;no 'check' target
 | 
			
		||||
    (home-page "http://www.portaudio.com/")
 | 
			
		||||
    (synopsis "Audio I/O library")
 | 
			
		||||
    (description
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -19,6 +19,7 @@
 | 
			
		|||
(define-module (gnu packages bioinformatics)
 | 
			
		||||
  #:use-module ((guix licenses) #:prefix license:)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix utils)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix git-download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
| 
						 | 
				
			
			@ -401,6 +402,46 @@ files between different genome assemblies.  It supports most commonly used
 | 
			
		|||
file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.")
 | 
			
		||||
    (license license:gpl2+)))
 | 
			
		||||
 | 
			
		||||
(define-public cutadapt
 | 
			
		||||
  (package
 | 
			
		||||
    (name "cutadapt")
 | 
			
		||||
    (version "1.8")
 | 
			
		||||
    (source (origin
 | 
			
		||||
              (method url-fetch)
 | 
			
		||||
              (uri (string-append
 | 
			
		||||
                    "https://github.com/marcelm/cutadapt/archive/v"
 | 
			
		||||
                    version ".tar.gz"))
 | 
			
		||||
              (file-name (string-append name "-" version ".tar.gz"))
 | 
			
		||||
              (sha256
 | 
			
		||||
               (base32
 | 
			
		||||
                "161bp87y6gd6r5bmvjpn2b1k942i3fizfpa139f0jn6jv1wcp5h5"))))
 | 
			
		||||
    (build-system python-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     ;; tests must be run after install
 | 
			
		||||
     `(#:phases (alist-cons-after
 | 
			
		||||
                 'install 'check
 | 
			
		||||
                 (lambda* (#:key inputs outputs #:allow-other-keys)
 | 
			
		||||
                   (setenv "PYTHONPATH"
 | 
			
		||||
                           (string-append
 | 
			
		||||
                            (getenv "PYTHONPATH")
 | 
			
		||||
                            ":" (assoc-ref outputs "out")
 | 
			
		||||
                            "/lib/python"
 | 
			
		||||
                            (string-take (string-take-right
 | 
			
		||||
                                          (assoc-ref inputs "python") 5) 3)
 | 
			
		||||
                            "/site-packages"))
 | 
			
		||||
                   (zero? (system* "nosetests" "-P" "tests")))
 | 
			
		||||
                 (alist-delete 'check %standard-phases))))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("python-cython" ,python-cython)
 | 
			
		||||
       ("python-nose" ,python-nose)
 | 
			
		||||
       ("python-setuptools" ,python-setuptools)))
 | 
			
		||||
    (home-page "https://code.google.com/p/cutadapt/")
 | 
			
		||||
    (synopsis "Remove adapter sequences from nucleotide sequencing reads")
 | 
			
		||||
    (description
 | 
			
		||||
     "Cutadapt finds and removes adapter sequences, primers, poly-A tails and
 | 
			
		||||
other types of unwanted sequence from high-throughput sequencing reads.")
 | 
			
		||||
    (license license:expat)))
 | 
			
		||||
 | 
			
		||||
(define-public flexbar
 | 
			
		||||
  (package
 | 
			
		||||
    (name "flexbar")
 | 
			
		||||
| 
						 | 
				
			
			@ -709,20 +750,25 @@ files and writing bioinformatics applications.")
 | 
			
		|||
            (chdir "pbtranscript-tofu/pbtranscript/")
 | 
			
		||||
            ;; Delete clutter
 | 
			
		||||
            (delete-file-recursively "dist/")
 | 
			
		||||
            (delete-file-recursively "build/")
 | 
			
		||||
            (delete-file-recursively "setuptools_cython-0.2.1-py2.6.egg/")
 | 
			
		||||
            (delete-file-recursively "pbtools.pbtranscript.egg-info")
 | 
			
		||||
            (delete-file "Cython-0.20.1.tar.gz")
 | 
			
		||||
            (delete-file "setuptools_cython-0.2.1-py2.7.egg")
 | 
			
		||||
            (delete-file "setuptools_cython-0.2.1.tar.gz")
 | 
			
		||||
            (delete-file "setup.cfg")
 | 
			
		||||
            (for-each delete-file
 | 
			
		||||
                      (find-files "." "\\.so$"))
 | 
			
		||||
            ;; files should be writable for install phase
 | 
			
		||||
            (for-each (lambda (f) (chmod f #o755))
 | 
			
		||||
                      (find-files "." "\\.py")))
 | 
			
		||||
                      (find-files "." "\\.py$")))
 | 
			
		||||
          %standard-phases)))
 | 
			
		||||
      (inputs
 | 
			
		||||
       `(("python-cython" ,python2-cython)
 | 
			
		||||
         ("python-numpy" ,python2-numpy)
 | 
			
		||||
         ("python-bx-python" ,python2-bx-python)
 | 
			
		||||
         ("python-networkx" ,python2-networkx)
 | 
			
		||||
         ("python-scipy" ,python2-scipy)
 | 
			
		||||
         ("python-pbcore" ,python2-pbcore)))
 | 
			
		||||
      (native-inputs
 | 
			
		||||
       `(("python-nose" ,python2-nose)
 | 
			
		||||
| 
						 | 
				
			
			@ -929,3 +975,43 @@ chimeric (fusion) transcripts, and is also capable of mapping full-length RNA
 | 
			
		|||
sequences.")
 | 
			
		||||
    ;; STAR is licensed under GPLv3 or later; htslib is MIT-licensed.
 | 
			
		||||
    (license license:gpl3+)))
 | 
			
		||||
 | 
			
		||||
(define-public vcftools
 | 
			
		||||
  (package
 | 
			
		||||
    (name "vcftools")
 | 
			
		||||
    (version "0.1.12b")
 | 
			
		||||
    (source (origin
 | 
			
		||||
              (method url-fetch)
 | 
			
		||||
              (uri (string-append
 | 
			
		||||
                    "mirror://sourceforge/vcftools/vcftools_"
 | 
			
		||||
                     version ".tar.gz"))
 | 
			
		||||
              (sha256
 | 
			
		||||
               (base32
 | 
			
		||||
                "148al9h7f8g8my2qdnpax51kdd2yjrivlx6frvakf4lz5r8j88wx"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     `(#:tests? #f ; no "check" target
 | 
			
		||||
       #:make-flags (list
 | 
			
		||||
                     (string-append "PREFIX=" (assoc-ref %outputs "out"))
 | 
			
		||||
                     (string-append "MANDIR=" (assoc-ref %outputs "out")
 | 
			
		||||
                                    "/share/man/man1"))
 | 
			
		||||
       #:phases
 | 
			
		||||
       (alist-cons-after
 | 
			
		||||
        'unpack 'patch-manpage-install
 | 
			
		||||
        (lambda _
 | 
			
		||||
          (substitute* "Makefile"
 | 
			
		||||
            (("cp \\$\\{PREFIX\\}/cpp/vcftools.1") "cp ./cpp/vcftools.1")))
 | 
			
		||||
        (alist-delete 'configure %standard-phases))))
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("perl" ,perl)
 | 
			
		||||
       ("zlib" ,zlib)))
 | 
			
		||||
    (home-page "http://vcftools.sourceforge.net/")
 | 
			
		||||
    (synopsis "Tools for working with VCF files")
 | 
			
		||||
    (description
 | 
			
		||||
     "VCFtools is a program package designed for working with VCF files, such
 | 
			
		||||
as those generated by the 1000 Genomes Project.  The aim of VCFtools is to
 | 
			
		||||
provide easily accessible methods for working with complex genetic variation
 | 
			
		||||
data in the form of VCF files.")
 | 
			
		||||
    ;; The license is declared as LGPLv3 in the README and
 | 
			
		||||
    ;; at http://vcftools.sourceforge.net/license.html
 | 
			
		||||
    (license license:lgpl3)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
 | 
			
		||||
;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
 | 
			
		||||
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +24,9 @@
 | 
			
		|||
  #:use-module (guix licenses)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix build-system gnu))
 | 
			
		||||
  #:use-module (guix git-download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module (guix build-system trivial))
 | 
			
		||||
 | 
			
		||||
(define-public check
 | 
			
		||||
  (package
 | 
			
		||||
| 
						 | 
				
			
			@ -99,3 +102,43 @@ with a flexible variety of user interfaces.")
 | 
			
		|||
unit testing.  Test output is in XML for automatic testing and GUI based for
 | 
			
		||||
supervised tests.")
 | 
			
		||||
    (license lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
 | 
			
		||||
 | 
			
		||||
(define-public catch-framework
 | 
			
		||||
  (package
 | 
			
		||||
    (name "catch")
 | 
			
		||||
    (version "1.0.53")                  ;Sub-minor is the build number
 | 
			
		||||
    (source (origin
 | 
			
		||||
              (method git-fetch)
 | 
			
		||||
              (uri (git-reference
 | 
			
		||||
                    (url "https://github.com/philsquared/Catch")
 | 
			
		||||
                    ;; Semi-arbitrary.  Contains mostly documentation fixes
 | 
			
		||||
                    ;; since build 53.
 | 
			
		||||
                    (commit "b9ec8a1")))
 | 
			
		||||
              (file-name (string-append name "-" version))
 | 
			
		||||
              (sha256
 | 
			
		||||
               (base32
 | 
			
		||||
                "05iijiwjwcjbza7qamwd32d0jypi0lpywmilmmj2xh280mcl4dbd"))))
 | 
			
		||||
    (build-system trivial-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     `(#:modules ((guix build utils))
 | 
			
		||||
       #:builder (begin
 | 
			
		||||
                   (use-modules (guix build utils))
 | 
			
		||||
                   (let* ((source (assoc-ref %build-inputs "source"))
 | 
			
		||||
                          (output (assoc-ref %outputs "out"))
 | 
			
		||||
                          (incdir (string-append output "/include"))
 | 
			
		||||
                          (docdir (string-append output "/share/doc/catch-"
 | 
			
		||||
                                                 ,version)))
 | 
			
		||||
                     (begin
 | 
			
		||||
                       (for-each mkdir-p (list incdir docdir))
 | 
			
		||||
                       (copy-file (string-append source
 | 
			
		||||
                                                 "/single_include/catch.hpp")
 | 
			
		||||
                                  (string-append incdir
 | 
			
		||||
                                                 "/catch.hpp"))
 | 
			
		||||
                       (copy-recursively (string-append source "/docs")
 | 
			
		||||
                                         docdir))))))
 | 
			
		||||
    (home-page "http://catch-lib.net/")
 | 
			
		||||
    (synopsis "Automated test framework for C++ and Objective-C")
 | 
			
		||||
    (description
 | 
			
		||||
     "Catch stands for C++ Automated Test Cases in Headers and is a
 | 
			
		||||
multi-paradigm automated test framework for C++ and Objective-C.")
 | 
			
		||||
    (license boost1.0)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,6 +23,7 @@
 | 
			
		|||
  #:use-module ((guix licenses) #:prefix license:)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module (gnu packages compression)
 | 
			
		||||
  #:use-module (gnu packages databases)
 | 
			
		||||
  #:use-module (gnu packages emacs)
 | 
			
		||||
  #:use-module (gnu packages pcre)
 | 
			
		||||
  #:use-module (gnu packages pkg-config)
 | 
			
		||||
| 
						 | 
				
			
			@ -86,21 +87,24 @@ highlighting your own code that seemed comprehensible when you wrote it.")
 | 
			
		|||
(define-public global                             ; a global variable
 | 
			
		||||
  (package
 | 
			
		||||
    (name "global")
 | 
			
		||||
    (version "6.3.4")
 | 
			
		||||
    (version "6.4")
 | 
			
		||||
    (source (origin
 | 
			
		||||
             (method url-fetch)
 | 
			
		||||
             (uri (string-append "mirror://gnu/global/global-"
 | 
			
		||||
                                 version ".tar.gz"))
 | 
			
		||||
             (sha256
 | 
			
		||||
              (base32
 | 
			
		||||
               "0hcplcayyjf42d8ygzla6142b5dq4ybq4wg3n3cgx3b5yfhvic85"))))
 | 
			
		||||
               "13i4zwx6gaibc4j79wd0hgxysw8ibxz9c018zxhydnxlyadzcnri"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (inputs `(("ncurses" ,ncurses)
 | 
			
		||||
              ("libltdl" ,libltdl)))
 | 
			
		||||
              ("libltdl" ,libltdl)
 | 
			
		||||
              ("sqlite" ,sqlite)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     `(#:configure-flags
 | 
			
		||||
       (list (string-append "--with-ncurses="
 | 
			
		||||
                            (assoc-ref %build-inputs "ncurses")))
 | 
			
		||||
                            (assoc-ref %build-inputs "ncurses"))
 | 
			
		||||
             (string-append "--with-sqlite3="
 | 
			
		||||
                            (assoc-ref %build-inputs "sqlite")))
 | 
			
		||||
 | 
			
		||||
       #:phases (alist-cons-after
 | 
			
		||||
                 'install 'post-install
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,7 +38,7 @@
 | 
			
		|||
  #:use-module (gnu packages python)
 | 
			
		||||
  #:use-module ((guix licenses)
 | 
			
		||||
                #:select (gpl2 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft
 | 
			
		||||
                          public-domain))
 | 
			
		||||
                          bsd-2 public-domain))
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
| 
						 | 
				
			
			@ -541,3 +541,29 @@ Driver.")
 | 
			
		|||
   (license lgpl2.1+) 
 | 
			
		||||
   ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL"
 | 
			
		||||
   (home-page "http://www.unixodbc.org")))
 | 
			
		||||
 | 
			
		||||
(define-public unqlite
 | 
			
		||||
  (package
 | 
			
		||||
    (name "unqlite")
 | 
			
		||||
    (version "1.1.6")
 | 
			
		||||
    (source (origin
 | 
			
		||||
              (method url-fetch)
 | 
			
		||||
              ;; Contains bug fixes against the official release, and has an
 | 
			
		||||
              ;; autotooled build system.
 | 
			
		||||
              (uri (string-append "https://github.com/aidin36/tocc/releases/"
 | 
			
		||||
                                  "download/v1.0.0/"
 | 
			
		||||
                                  "unqlite-unofficial-" version ".tar.gz"))
 | 
			
		||||
              (sha256
 | 
			
		||||
               (base32
 | 
			
		||||
                "1sbpvhg15gadq0mpcy16q7k3rkg4b4dicpnn5xifpkpn02sqik3s"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (arguments `(#:tests? #f))          ;No check target
 | 
			
		||||
    (home-page "http://www.unqlite.org")
 | 
			
		||||
    (synopsis "In-memory key/value and document store")
 | 
			
		||||
    (description
 | 
			
		||||
     "UnQLite is an in-process software library which implements a
 | 
			
		||||
self-contained, serverless, zero-configuration, transactional NoSQL
 | 
			
		||||
database engine.  UnQLite is a document store database similar to
 | 
			
		||||
MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store
 | 
			
		||||
similar to BerkelyDB, LevelDB, etc.")
 | 
			
		||||
    (license bsd-2)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,7 +84,10 @@ as ASCII text.")
 | 
			
		|||
	      ("libxxf86vm" ,libxxf86vm)
 | 
			
		||||
	      ("inputproto" ,inputproto)
 | 
			
		||||
	      ("xinput" ,xinput)))
 | 
			
		||||
    (propagated-inputs `(("glu" ,glu)))
 | 
			
		||||
    (propagated-inputs
 | 
			
		||||
     ;; Headers from Mesa and GLU are needed.
 | 
			
		||||
     `(("glu" ,glu)
 | 
			
		||||
       ("mesa" ,mesa)))
 | 
			
		||||
    (home-page "http://freeglut.sourceforge.net/")
 | 
			
		||||
    (synopsis "Alternative to the OpenGL Utility Toolkit (GLUT)")
 | 
			
		||||
    (description
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1621,3 +1621,48 @@ library.")
 | 
			
		|||
    ;; This is the license of the rsvg bindings.  The license of each module
 | 
			
		||||
    ;; of gnome-python-desktop is given in 'COPYING'.
 | 
			
		||||
    (license license:lgpl2.1+)))
 | 
			
		||||
 | 
			
		||||
(define-public gnome-mines
 | 
			
		||||
  (package
 | 
			
		||||
    (name "gnome-mines")
 | 
			
		||||
    (version "3.14.1")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (string-append "mirror://gnome/sources/" name "/"
 | 
			
		||||
                           (version-major+minor version) "/"
 | 
			
		||||
                           name "-" version ".tar.xz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32
 | 
			
		||||
         "0nbgvzlsznn3v83pdcx2d52r4ig1mvaijh633rjddx9rgq2ja7kv"))))
 | 
			
		||||
    (build-system glib-or-gtk-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:phases
 | 
			
		||||
       (modify-phases %standard-phases
 | 
			
		||||
         (add-before configure patch-/bin/true
 | 
			
		||||
                     (lambda _
 | 
			
		||||
                       (substitute* "configure"
 | 
			
		||||
                         (("/bin/true") (which "true")))))
 | 
			
		||||
         (add-after install wrap-pixbuf
 | 
			
		||||
                    ;; Use librsvg's loaders.cache to support SVG files.
 | 
			
		||||
                    (lambda* (#:key inputs outputs #:allow-other-keys)
 | 
			
		||||
                      (let* ((out    (assoc-ref outputs "out"))
 | 
			
		||||
                             (prog   (string-append out "/bin/gnome-mines"))
 | 
			
		||||
                             (rsvg   (assoc-ref inputs "librsvg"))
 | 
			
		||||
                             (pixbuf (find-files rsvg "^loaders\\.cache$")))
 | 
			
		||||
                        (wrap-program prog
 | 
			
		||||
                          `("GDK_PIXBUF_MODULE_FILE" = ,pixbuf))))))))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("pkg-config" ,pkg-config)
 | 
			
		||||
       ("desktop-file-utils" ,desktop-file-utils)
 | 
			
		||||
       ("intltool" ,intltool)
 | 
			
		||||
       ("itstool" ,itstool)))
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("gtk+" ,gtk+)
 | 
			
		||||
       ("librsvg" ,librsvg)))
 | 
			
		||||
    (home-page "https://wiki.gnome.org/Apps/Mines")
 | 
			
		||||
    (synopsis "Minesweeper game")
 | 
			
		||||
    (description
 | 
			
		||||
     "Mines (previously gnomine) is a puzzle game where you locate mines
 | 
			
		||||
floating in an ocean using only your brain and a little bit of luck.")
 | 
			
		||||
    (license license:gpl2+)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -224,7 +224,14 @@ standards.")
 | 
			
		|||
                          version "/" name "-" version ".tar.bz2"))
 | 
			
		||||
      (sha256
 | 
			
		||||
       (base32
 | 
			
		||||
        "1rr4axghaypdkrf60i1qp6dz4cd29ya02fs3vyffvp4x9kgcq2dd"))))
 | 
			
		||||
        "1rr4axghaypdkrf60i1qp6dz4cd29ya02fs3vyffvp4x9kgcq2dd"))
 | 
			
		||||
      (patches (map search-patch '("icecat-bug-1127780.patch"
 | 
			
		||||
                                   "icecat-CVE-2015-0817.patch"
 | 
			
		||||
                                   "icecat-bug-1144991.patch"
 | 
			
		||||
                                   "icecat-CVE-2015-0818-pt1.patch"
 | 
			
		||||
                                   "icecat-bug-1145870.patch"
 | 
			
		||||
                                   "icecat-CVE-2015-0818-pt2.patch"
 | 
			
		||||
                                   "icecat-bug-1146339.patch")))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("alsa-lib" ,alsa-lib)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;; Copyright © 2015 Tomáš Čech <sleep_walker@gnu.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										92
									
								
								gnu/packages/ibus.scm
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								gnu/packages/ibus.scm
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,92 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
 | 
			
		||||
;;; under the terms of the GNU General Public License as published by
 | 
			
		||||
;;; the Free Software Foundation; either version 3 of the License, or (at
 | 
			
		||||
;;; your option) any later version.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is distributed in the hope that it will be useful, but
 | 
			
		||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
;;; GNU General Public License for more details.
 | 
			
		||||
;;;
 | 
			
		||||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (gnu packages ibus)
 | 
			
		||||
  #:use-module (guix licenses)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module (guix build-system glib-or-gtk)
 | 
			
		||||
  #:use-module (gnu packages)
 | 
			
		||||
  #:use-module (gnu packages glib)
 | 
			
		||||
  #:use-module (gnu packages gnome)
 | 
			
		||||
  #:use-module (gnu packages gtk)
 | 
			
		||||
  #:use-module (gnu packages iso-codes)
 | 
			
		||||
  #:use-module (gnu packages pkg-config)
 | 
			
		||||
  #:use-module (gnu packages python))
 | 
			
		||||
 | 
			
		||||
(define-public ibus
 | 
			
		||||
  (package
 | 
			
		||||
   (name "ibus")
 | 
			
		||||
   (version "1.5.5")
 | 
			
		||||
   (source (origin
 | 
			
		||||
             (method url-fetch)
 | 
			
		||||
             (uri (string-append "https://ibus.googlecode.com/files/ibus-"
 | 
			
		||||
                                 version ".tar.gz"))
 | 
			
		||||
             (sha256
 | 
			
		||||
              (base32
 | 
			
		||||
               "1v4a9xv2k26g6ggk4282ynfvh68j2r5hg1cdpvnryfa8c2pkdaq2"))))
 | 
			
		||||
   (build-system glib-or-gtk-build-system)
 | 
			
		||||
   (arguments
 | 
			
		||||
    `(#:tests? #f  ; tests fail because there's no connection to dbus
 | 
			
		||||
      #:make-flags
 | 
			
		||||
      (list "CC=gcc"
 | 
			
		||||
            (string-append "pyoverridesdir="
 | 
			
		||||
                           (assoc-ref %outputs "out")
 | 
			
		||||
                           "/lib/python2.7/site-packages/gi/overrides/"))
 | 
			
		||||
      #:phases
 | 
			
		||||
      (alist-cons-before
 | 
			
		||||
       'configure 'disable-dconf-update
 | 
			
		||||
       (lambda _
 | 
			
		||||
         (substitute* "data/dconf/Makefile.in"
 | 
			
		||||
           (("dconf update") "echo dconf update"))
 | 
			
		||||
         #t)
 | 
			
		||||
       (alist-cons-after
 | 
			
		||||
        'wrap-program 'wrap-with-additional-paths
 | 
			
		||||
        (lambda* (#:key outputs #:allow-other-keys)
 | 
			
		||||
          ;; Make sure 'ibus-setup' runs with the correct PYTHONPATH and
 | 
			
		||||
          ;; GI_TYPELIB_PATH.
 | 
			
		||||
          (let ((out (assoc-ref outputs "out")))
 | 
			
		||||
            (wrap-program (string-append out "/bin/ibus-setup")
 | 
			
		||||
              `("PYTHONPATH" ":" prefix (,(getenv "PYTHONPATH")))
 | 
			
		||||
              `("GI_TYPELIB_PATH" ":" prefix
 | 
			
		||||
                (,(getenv "GI_TYPELIB_PATH")
 | 
			
		||||
                 ,(string-append out "/lib/girepository-1.0"))))))
 | 
			
		||||
        %standard-phases))))
 | 
			
		||||
   (inputs
 | 
			
		||||
    `(("dbus" ,dbus)
 | 
			
		||||
      ("dconf" ,dconf)
 | 
			
		||||
      ("gconf" ,gconf)
 | 
			
		||||
      ("glib" ,glib)
 | 
			
		||||
      ("gtk2" ,gtk+-2)
 | 
			
		||||
      ("intltool" ,intltool)
 | 
			
		||||
      ("libnotify" ,libnotify)
 | 
			
		||||
      ("iso-codes" ,iso-codes)
 | 
			
		||||
      ("pygobject2" ,python2-pygobject)
 | 
			
		||||
      ("python2" ,python-2)))
 | 
			
		||||
   (native-inputs
 | 
			
		||||
    `(("glib" ,glib "bin") ; for glib-genmarshal
 | 
			
		||||
      ("gobject-introspection" ,gobject-introspection) ; for g-ir-compiler
 | 
			
		||||
      ("pkg-config" ,pkg-config)))
 | 
			
		||||
   (synopsis "Input method framework")
 | 
			
		||||
   (description
 | 
			
		||||
    "IBus is an input framework providing a full-featured and user-friendly
 | 
			
		||||
input method user interface.  It comes with multilingual input support.  It
 | 
			
		||||
may also simplify input method development.")
 | 
			
		||||
   (home-page "http://ibus.googlecode.com/")
 | 
			
		||||
   (license lgpl2.1+)))
 | 
			
		||||
| 
						 | 
				
			
			@ -24,11 +24,13 @@
 | 
			
		|||
(define-module (gnu packages image)
 | 
			
		||||
  #: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 doxygen)
 | 
			
		||||
  #:use-module (gnu packages fontutils)
 | 
			
		||||
  #:use-module (gnu packages ghostscript)
 | 
			
		||||
  #:use-module (gnu packages gl)
 | 
			
		||||
  #:use-module (gnu packages maths)
 | 
			
		||||
  #:use-module (gnu packages perl)
 | 
			
		||||
  #:use-module (gnu packages pkg-config)
 | 
			
		||||
| 
						 | 
				
			
			@ -163,6 +165,65 @@ the W3C's XML-based Scaleable Vector Graphic (SVG) format.")
 | 
			
		|||
    ;; 'COPYING' is the GPLv2, but file headers say LGPLv2.0+.
 | 
			
		||||
    (license license:lgpl2.0+)))
 | 
			
		||||
 | 
			
		||||
(define-public leptonica
 | 
			
		||||
  (package
 | 
			
		||||
    (name "leptonica")
 | 
			
		||||
    (version "1.71")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (string-append "http://www.leptonica.com/source/leptonica-"
 | 
			
		||||
                           version ".tar.gz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "0j5qgrff6im5n9waflbi7w643q1p6mahyf2z35gb4vj9h5p76pfc"))
 | 
			
		||||
       (modules '((guix build utils)))
 | 
			
		||||
       ;; zlib and openjpg should be under Libs, not Libs.private.  See:
 | 
			
		||||
       ;; https://code.google.com/p/tesseract-ocr/issues/detail?id=1436
 | 
			
		||||
       (snippet
 | 
			
		||||
        '(substitute* "lept.pc.in"
 | 
			
		||||
           (("^(Libs\\.private: .*)@ZLIB_LIBS@(.*)" all pre post)
 | 
			
		||||
            (string-append pre post))
 | 
			
		||||
           (("^(Libs\\.private: .*)@JPEG_LIBS@(.*)" all pre post)
 | 
			
		||||
            (string-append pre post))
 | 
			
		||||
           (("^Libs: .*" all)
 | 
			
		||||
            (string-append all " @ZLIB_LIBS@ @JPEG_LIBS@"))))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("gnuplot" ,gnuplot)))           ;needed for test suite
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("giflib" ,giflib)
 | 
			
		||||
       ("libjpeg" ,libjpeg)
 | 
			
		||||
       ("libpng" ,libpng)
 | 
			
		||||
       ("libtiff" ,libtiff)
 | 
			
		||||
       ("libwebp" ,libwebp)))
 | 
			
		||||
    (propagated-inputs
 | 
			
		||||
     `(("openjpeg" ,openjpeg)
 | 
			
		||||
       ("zlib" ,zlib)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:phases
 | 
			
		||||
       (modify-phases %standard-phases
 | 
			
		||||
         ;; Prevent make from trying to regenerate config.h.in.
 | 
			
		||||
         (add-after
 | 
			
		||||
          unpack set-config-h-in-file-time
 | 
			
		||||
          (lambda _
 | 
			
		||||
            (set-file-time "config/config.h.in" (stat "configure"))))
 | 
			
		||||
         (add-after
 | 
			
		||||
          unpack patch-reg-wrapper
 | 
			
		||||
          (lambda _
 | 
			
		||||
            (substitute* "prog/reg_wrapper.sh"
 | 
			
		||||
              ((" /bin/sh ")
 | 
			
		||||
               (string-append " " (which "sh") " "))))))))
 | 
			
		||||
    (home-page "http://www.leptonica.com/")
 | 
			
		||||
    (synopsis "Library and tools for image processing and analysis")
 | 
			
		||||
    (description
 | 
			
		||||
     "Leptonica is a C library and set of command-line tools for efficient
 | 
			
		||||
image processing and image analysis operations.  It supports rasterop, affine
 | 
			
		||||
transformations, binary and grayscale morphology, rank order, and convolution,
 | 
			
		||||
seedfill and connected components, image transformations combining changes in
 | 
			
		||||
scale and pixel depth, and pixelwise masking, blending, enhancement, and
 | 
			
		||||
arithmetic ops.")
 | 
			
		||||
    (license license:bsd-2)))
 | 
			
		||||
 | 
			
		||||
(define-public jbig2dec
 | 
			
		||||
  (package
 | 
			
		||||
    (name "jbig2dec")
 | 
			
		||||
| 
						 | 
				
			
			@ -475,3 +536,39 @@ algorithms and data structures.  It is particularly strong for
 | 
			
		|||
multi-dimensional image processing.")
 | 
			
		||||
   (license license:expat)
 | 
			
		||||
   (home-page "https://hci.iwr.uni-heidelberg.de/vigra")))
 | 
			
		||||
 | 
			
		||||
(define-public libwebp
 | 
			
		||||
  (package
 | 
			
		||||
    (name "libwebp")
 | 
			
		||||
    (version "0.4.3")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (string-append
 | 
			
		||||
             "http://downloads.webmproject.org/releases/webp/libwebp-" version
 | 
			
		||||
             ".tar.gz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "1i4hfczjm3b1qj1g4cc9hgb69l47f3nkgf6hk7nz4dm9zmc0vgpg"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("freeglut" ,freeglut)
 | 
			
		||||
       ("giflib" ,giflib)
 | 
			
		||||
       ("libjpeg" ,libjpeg)
 | 
			
		||||
       ("libpng" ,libpng)
 | 
			
		||||
       ("libtiff" ,libtiff)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:configure-flags '("--enable-libwebpmux"
 | 
			
		||||
                           "--enable-libwebpdemux"
 | 
			
		||||
                           "--enable-libwebpdecoder")))
 | 
			
		||||
    (home-page "https://developers.google.com/speed/webp/")
 | 
			
		||||
    (synopsis "Lossless and lossy image compression")
 | 
			
		||||
    (description
 | 
			
		||||
     "WebP is a new image format that provides lossless and lossy compression
 | 
			
		||||
for images. WebP lossless images are 26% smaller in size compared to
 | 
			
		||||
PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
 | 
			
		||||
equivalent SSIM index. WebP supports lossless transparency (also known as
 | 
			
		||||
alpha channel) with just 22% additional bytes. Transparency is also supported
 | 
			
		||||
with lossy compression and typically provides 3x smaller file sizes compared
 | 
			
		||||
to PNG when lossy compression is acceptable for the red/green/blue color
 | 
			
		||||
channels.")
 | 
			
		||||
    (license license:bsd-3)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -198,7 +198,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
 | 
			
		|||
     #f)))
 | 
			
		||||
 | 
			
		||||
(define-public linux-libre
 | 
			
		||||
  (let* ((version "3.18.9")
 | 
			
		||||
  (let* ((version "3.18.10")
 | 
			
		||||
         (build-phase
 | 
			
		||||
          '(lambda* (#:key system inputs #:allow-other-keys #:rest args)
 | 
			
		||||
             ;; Apply the neat patch.
 | 
			
		||||
| 
						 | 
				
			
			@ -271,7 +271,7 @@ for SYSTEM, or #f if there is no configuration for SYSTEM."
 | 
			
		|||
             (uri (linux-libre-urls version))
 | 
			
		||||
             (sha256
 | 
			
		||||
              (base32
 | 
			
		||||
               "0n3p9ci8w71hd168df7xlccafxzb3agr8rk3xmvnj7dnbfiddqv6"))))
 | 
			
		||||
               "0ckbi94b56klp59wsfcmlkbyrj7hj7kb7ys2jjsrqsk39dd77zg5"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (native-inputs `(("perl" ,perl)
 | 
			
		||||
                     ("bc" ,bc)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										61
									
								
								gnu/packages/lirc.scm
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								gnu/packages/lirc.scm
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,61 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
 | 
			
		||||
;;; under the terms of the GNU General Public License as published by
 | 
			
		||||
;;; the Free Software Foundation; either version 3 of the License, or (at
 | 
			
		||||
;;; your option) any later version.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is distributed in the hope that it will be useful, but
 | 
			
		||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
;;; GNU General Public License for more details.
 | 
			
		||||
;;;
 | 
			
		||||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (gnu packages lirc)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module ((guix licenses) #:prefix license:)
 | 
			
		||||
  #:use-module (gnu packages)
 | 
			
		||||
  #:use-module (gnu packages pkg-config)
 | 
			
		||||
  #:use-module (gnu packages linux)
 | 
			
		||||
  #:use-module (gnu packages xorg)
 | 
			
		||||
  #:use-module (gnu packages python))
 | 
			
		||||
 | 
			
		||||
(define-public lirc
 | 
			
		||||
  (package
 | 
			
		||||
    (name "lirc")
 | 
			
		||||
    (version "0.9.2a")
 | 
			
		||||
    (source (origin
 | 
			
		||||
              (method url-fetch)
 | 
			
		||||
              (uri (string-append "mirror://sourceforge/lirc/lirc-"
 | 
			
		||||
                                  version ".tar.bz2"))
 | 
			
		||||
              (sha256
 | 
			
		||||
               (base32
 | 
			
		||||
                "011nwpxm5d12rsapljg3pjf9pgb0j8ngmc3zg69q4kv61hkx2zim"))
 | 
			
		||||
              (patches (list (search-patch "lirc-localstatedir.patch")))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:configure-flags '("--localstatedir=/var")))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("pkg-config" ,pkg-config)))
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("libx11" ,libx11)
 | 
			
		||||
       ("alsa-lib" ,alsa-lib)
 | 
			
		||||
       ("python" ,python)))
 | 
			
		||||
    (home-page "http://www.lirc.org/")
 | 
			
		||||
    (synopsis "Linux Infrared Remote Control")
 | 
			
		||||
    (description
 | 
			
		||||
     "LIRC allows computers to send and receive IR signals of many commonly
 | 
			
		||||
used remote controls.  The most important part of LIRC is the 'lircd' daemon
 | 
			
		||||
that decodes IR signals received by the device drivers.  The second daemon
 | 
			
		||||
program 'lircmd' allows to translate IR signals to mouse movements.  The
 | 
			
		||||
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+)))
 | 
			
		||||
| 
						 | 
				
			
			@ -1033,11 +1033,14 @@ constant parts of it.")
 | 
			
		|||
    (build-system gnu-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:tests? #f  ;no "check" target
 | 
			
		||||
       #:substitutable? #f ;force local build because of CPU detection
 | 
			
		||||
       #:make-flags
 | 
			
		||||
       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
 | 
			
		||||
             "SHELL=bash"
 | 
			
		||||
             "NO_LAPACK=1")
 | 
			
		||||
             "NO_LAPACK=1"
 | 
			
		||||
             ;; Build the library for all supported CPUs.  This allows
 | 
			
		||||
             ;; switching CPU targets at runtime with the environment variable
 | 
			
		||||
             ;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
 | 
			
		||||
             "DYNAMIC_ARCH=1")
 | 
			
		||||
       ;; no configure script
 | 
			
		||||
       #:phases (alist-delete 'configure %standard-phases)))
 | 
			
		||||
    (inputs
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -201,7 +201,22 @@ dictionaries.  HexChat can be extended with multiple addons.")
 | 
			
		|||
        'configure 'post-configure
 | 
			
		||||
        (lambda _
 | 
			
		||||
          (substitute* "src/ngircd/Makefile"
 | 
			
		||||
            (("/bin/sh") (which "sh"))))
 | 
			
		||||
            (("/bin/sh") (which "sh")))
 | 
			
		||||
          ;; The default getpid.sh does a sloppy grep over 'ps -ax' output,
 | 
			
		||||
          ;; which fails arbitrarily.
 | 
			
		||||
          (with-output-to-file "src/testsuite/getpid.sh"
 | 
			
		||||
            (lambda ()
 | 
			
		||||
              (display
 | 
			
		||||
               (string-append
 | 
			
		||||
                "#!" (which "sh") "\n"
 | 
			
		||||
                "ps -C \"$1\" -o pid=\n"))))
 | 
			
		||||
          ;; Our variant of getpid.sh does not work for interpreter names if a
 | 
			
		||||
          ;; shebang script is run directly as "./foo", so patch cases where
 | 
			
		||||
          ;; the test suite relies on this.
 | 
			
		||||
          (substitute* "src/testsuite/start-server.sh"
 | 
			
		||||
            ;; It runs 'getpid.sh sh' to test if it works at all.  Run it on
 | 
			
		||||
            ;; 'make' instead.
 | 
			
		||||
            (("getpid.sh sh") "getpid.sh make")))
 | 
			
		||||
        %standard-phases)))
 | 
			
		||||
    (home-page "http://ngircd.barton.de/")
 | 
			
		||||
    (synopsis "Lightweight Internet Relay Chat server for small networks")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,7 @@
 | 
			
		|||
(define-public nano
 | 
			
		||||
  (package
 | 
			
		||||
    (name "nano")
 | 
			
		||||
    (version "2.3.6")
 | 
			
		||||
    (version "2.4.0")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
      (method url-fetch)
 | 
			
		||||
| 
						 | 
				
			
			@ -35,7 +35,7 @@
 | 
			
		|||
                          version ".tar.gz"))
 | 
			
		||||
      (sha256
 | 
			
		||||
       (base32
 | 
			
		||||
        "0d4ml0v9yi37pjs211xs38w9whsj6530wz3kmrvwgh8jigqz6jx7"))))
 | 
			
		||||
        "1gbm9bcv4k55y01r5q8a8a9s3yrrgq3z5jxxiij3wl404r8gnxjh"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("gettext" ,gnu-gettext)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										93
									
								
								gnu/packages/ocr.scm
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								gnu/packages/ocr.scm
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,93 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
 | 
			
		||||
;;; under the terms of the GNU General Public License as published by
 | 
			
		||||
;;; the Free Software Foundation; either version 3 of the License, or (at
 | 
			
		||||
;;; your option) any later version.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is distributed in the hope that it will be useful, but
 | 
			
		||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
;;; GNU General Public License for more details.
 | 
			
		||||
;;;
 | 
			
		||||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (gnu packages ocr)
 | 
			
		||||
  #:use-module ((guix licenses) #:prefix license:)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module (gnu packages autotools)
 | 
			
		||||
  #:use-module (gnu packages compression)
 | 
			
		||||
  #:use-module (gnu packages image)
 | 
			
		||||
  #:use-module (gnu packages pkg-config))
 | 
			
		||||
 | 
			
		||||
(define-public ocrad
 | 
			
		||||
  (package
 | 
			
		||||
    (name "ocrad")
 | 
			
		||||
    (version "0.24")
 | 
			
		||||
    (source (origin
 | 
			
		||||
             (method url-fetch)
 | 
			
		||||
             (uri (string-append "mirror://gnu/ocrad/ocrad-"
 | 
			
		||||
                                 version ".tar.lz"))
 | 
			
		||||
             (sha256
 | 
			
		||||
              (base32
 | 
			
		||||
               "0hhlx072d00bi9qia0nj5izsq4qkscpfz2mpbyfc72msl3hfvslv"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (native-inputs `(("lzip" ,lzip)))
 | 
			
		||||
    (home-page "http://www.gnu.org/software/ocrad/")
 | 
			
		||||
    (synopsis "Optical character recognition based on feature extraction")
 | 
			
		||||
    (description
 | 
			
		||||
     "GNU Ocrad is an optical character recognition program based on a
 | 
			
		||||
feature extraction method.  It can read images in PBM, PGM or PPM formats and
 | 
			
		||||
it produces text in 8-bit or UTF-8 formats.")
 | 
			
		||||
    (license license:gpl3+)))
 | 
			
		||||
 | 
			
		||||
(define-public tesseract-ocr
 | 
			
		||||
  (package
 | 
			
		||||
    (name "tesseract-ocr")
 | 
			
		||||
    (version "3.02.02")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (string-append
 | 
			
		||||
             "https://tesseract-ocr.googlecode.com/files/tesseract-ocr-"
 | 
			
		||||
             version ".tar.gz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "0g81m9y4iydp7kgr56mlkvjdwpp3mb01q385yhdnyvra7z5kkk96"))
 | 
			
		||||
       (modules '((guix build utils)))
 | 
			
		||||
       ;; Leptonica added a pkg-config file in the meanwhile.
 | 
			
		||||
       (snippet
 | 
			
		||||
        '(substitute* "tesseract.pc.in"
 | 
			
		||||
           (("^# Requires: lept  ## .*")
 | 
			
		||||
            "Requires: lept\n")))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("autoconf" ,autoconf)
 | 
			
		||||
       ("automake" ,automake)
 | 
			
		||||
       ("libtool" ,libtool)))
 | 
			
		||||
    (propagated-inputs
 | 
			
		||||
     `(("leptonica" ,leptonica)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:phases
 | 
			
		||||
       (modify-phases %standard-phases
 | 
			
		||||
         (add-after
 | 
			
		||||
          unpack autogen
 | 
			
		||||
          (lambda _
 | 
			
		||||
            (zero? (system* "sh" "autogen.sh")))))
 | 
			
		||||
       #:configure-flags
 | 
			
		||||
       (let ((leptonica (assoc-ref %build-inputs "leptonica")))
 | 
			
		||||
         (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include")))))
 | 
			
		||||
    (home-page "https://code.google.com/p/tesseract-ocr/")
 | 
			
		||||
    (synopsis "Optical character recognition engine")
 | 
			
		||||
    (description
 | 
			
		||||
     "Tesseract is an optical character recognition (OCR) engine with very
 | 
			
		||||
high accuracy.  It supports many languages, output text formatting, hOCR
 | 
			
		||||
positional information and page layout analysis.  Several image formats are
 | 
			
		||||
supported through the Leptonica library.  It can also detect whether text is
 | 
			
		||||
monospaced or proportional.")
 | 
			
		||||
    (license license:asl2.0)))
 | 
			
		||||
| 
						 | 
				
			
			@ -1,46 +0,0 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
 | 
			
		||||
;;; under the terms of the GNU General Public License as published by
 | 
			
		||||
;;; the Free Software Foundation; either version 3 of the License, or (at
 | 
			
		||||
;;; your option) any later version.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is distributed in the hope that it will be useful, but
 | 
			
		||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
;;; GNU General Public License for more details.
 | 
			
		||||
;;;
 | 
			
		||||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (gnu packages ocrad)
 | 
			
		||||
  #:use-module (guix licenses)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module ((gnu packages compression)
 | 
			
		||||
                #:select (lzip)))
 | 
			
		||||
 | 
			
		||||
(define-public ocrad
 | 
			
		||||
  (package
 | 
			
		||||
    (name "ocrad")
 | 
			
		||||
    (version "0.24")
 | 
			
		||||
    (source (origin
 | 
			
		||||
             (method url-fetch)
 | 
			
		||||
             (uri (string-append "mirror://gnu/ocrad/ocrad-"
 | 
			
		||||
                                 version ".tar.lz"))
 | 
			
		||||
             (sha256
 | 
			
		||||
              (base32
 | 
			
		||||
               "0hhlx072d00bi9qia0nj5izsq4qkscpfz2mpbyfc72msl3hfvslv"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (native-inputs `(("lzip" ,lzip)))
 | 
			
		||||
    (home-page "http://www.gnu.org/software/ocrad/")
 | 
			
		||||
    (synopsis "Optical character recognition based on feature extraction")
 | 
			
		||||
    (description
 | 
			
		||||
     "GNU Ocrad is an optical character recognition program based on a
 | 
			
		||||
feature extraction method.  It can read images in PBM, PGM or PPM formats and
 | 
			
		||||
it produces text in 8-bit or UTF-8 formats.")
 | 
			
		||||
    (license gpl3+)))
 | 
			
		||||
							
								
								
									
										32
									
								
								gnu/packages/patches/audacity-fix-ffmpeg-binding.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								gnu/packages/patches/audacity-fix-ffmpeg-binding.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,32 @@
 | 
			
		|||
This resolves some "declaration of C function conflicts with previous
 | 
			
		||||
declaration" errors during compilation.
 | 
			
		||||
 | 
			
		||||
--- a/src/FFmpeg.h	2015-02-21 00:33:33.853857529 +0100
 | 
			
		||||
+++ b/src/FFmpeg.h	2015-02-21 00:35:09.626497205 +0100
 | 
			
		||||
@@ -688,7 +688,7 @@
 | 
			
		||||
    FFMPEG_FUNCTION_WITH_RETURN(
 | 
			
		||||
       AVOutputFormat*,
 | 
			
		||||
       av_oformat_next,
 | 
			
		||||
-      (AVOutputFormat *f),
 | 
			
		||||
+      (const AVOutputFormat *f),
 | 
			
		||||
       (f)
 | 
			
		||||
    );
 | 
			
		||||
    FFMPEG_FUNCTION_WITH_RETURN(
 | 
			
		||||
@@ -755,7 +755,7 @@
 | 
			
		||||
    FFMPEG_FUNCTION_WITH_RETURN(
 | 
			
		||||
       int,
 | 
			
		||||
       av_fifo_size,
 | 
			
		||||
-      (AVFifoBuffer *f),
 | 
			
		||||
+      (const AVFifoBuffer *f),
 | 
			
		||||
       (f)
 | 
			
		||||
    );
 | 
			
		||||
    FFMPEG_FUNCTION_WITH_RETURN(
 | 
			
		||||
@@ -801,7 +801,7 @@
 | 
			
		||||
    FFMPEG_FUNCTION_WITH_RETURN(
 | 
			
		||||
       AVDictionaryEntry *,
 | 
			
		||||
       av_dict_get,
 | 
			
		||||
-      (AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags),
 | 
			
		||||
+      (const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags),
 | 
			
		||||
       (m, key, prev, flags)
 | 
			
		||||
    );
 | 
			
		||||
    FFMPEG_FUNCTION_WITH_RETURN(
 | 
			
		||||
							
								
								
									
										44
									
								
								gnu/packages/patches/icecat-CVE-2015-0817.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								gnu/packages/patches/icecat-CVE-2015-0817.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,44 @@
 | 
			
		|||
From cedbdf8290018fbef65458e9e438c72adf2c2775 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Steve Fink <sfink@mozilla.com>
 | 
			
		||||
Date: Thu, 19 Mar 2015 15:46:24 -0700
 | 
			
		||||
Subject: [PATCH] Bug 1145255. r=luke, a=lmandel
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 js/src/jit/AsmJS.cpp | 13 +++++++++++--
 | 
			
		||||
 1 file changed, 11 insertions(+), 2 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/js/src/jit/AsmJS.cpp b/js/src/jit/AsmJS.cpp
 | 
			
		||||
index 302b5ab..1b8eed6 100644
 | 
			
		||||
--- a/js/src/jit/AsmJS.cpp
 | 
			
		||||
+++ b/js/src/jit/AsmJS.cpp
 | 
			
		||||
@@ -14,6 +14,7 @@
 | 
			
		||||
 
 | 
			
		||||
 #include "jsmath.h"
 | 
			
		||||
 #include "jsprf.h"
 | 
			
		||||
+#include "jsutil.h"
 | 
			
		||||
 #include "jsworkers.h"
 | 
			
		||||
 #include "prmjtime.h"
 | 
			
		||||
 
 | 
			
		||||
@@ -3432,9 +3433,17 @@ FoldMaskedArrayIndex(FunctionCompiler &f, ParseNode **indexExpr, int32_t *mask,
 | 
			
		||||
     if (IsLiteralOrConstInt(f, maskNode, &mask2)) {
 | 
			
		||||
         // Flag the access to skip the bounds check if the mask ensures that an 'out of
 | 
			
		||||
         // bounds' access can not occur based on the current heap length constraint.
 | 
			
		||||
-        if (mask2 == 0 ||
 | 
			
		||||
-            CountLeadingZeroes32(f.m().minHeapLength() - 1) <= CountLeadingZeroes32(mask2)) {
 | 
			
		||||
+        if (mask2 == 0) {
 | 
			
		||||
             *needsBoundsCheck = NO_BOUNDS_CHECK;
 | 
			
		||||
+        } else {
 | 
			
		||||
+            uint32_t minHeap = f.m().minHeapLength();
 | 
			
		||||
+            uint32_t minHeapZeroes = CountLeadingZeroes32(minHeap - 1);
 | 
			
		||||
+            uint32_t maskZeroes = CountLeadingZeroes32(mask2);
 | 
			
		||||
+            if ((minHeapZeroes < maskZeroes) ||
 | 
			
		||||
+                (IsPowerOfTwo(minHeap) && minHeapZeroes == maskZeroes))
 | 
			
		||||
+            {
 | 
			
		||||
+                *needsBoundsCheck = NO_BOUNDS_CHECK;
 | 
			
		||||
+            }
 | 
			
		||||
         }
 | 
			
		||||
         *mask &= mask2;
 | 
			
		||||
         *indexExpr = indexNode;
 | 
			
		||||
-- 
 | 
			
		||||
2.2.1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										67
									
								
								gnu/packages/patches/icecat-CVE-2015-0818-pt1.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								gnu/packages/patches/icecat-CVE-2015-0818-pt1.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,67 @@
 | 
			
		|||
From 79dddb16aaa58f5b5cef49dac6d234f500af3baf Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Olli Pettay <Olli.Pettay@helsinki.fi>
 | 
			
		||||
Date: Thu, 19 Mar 2015 21:53:32 -0400
 | 
			
		||||
Subject: [PATCH] Bug 1144988 - Don't let other pages to load while doing
 | 
			
		||||
 scroll-to-anchor. r=bz, a=lmandel
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 docshell/base/nsDocShell.cpp | 23 ++++++++++++++---------
 | 
			
		||||
 docshell/base/nsDocShell.h   |  1 +
 | 
			
		||||
 2 files changed, 15 insertions(+), 9 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
 | 
			
		||||
index 887c910..14ff3f2 100644
 | 
			
		||||
--- a/docshell/base/nsDocShell.cpp
 | 
			
		||||
+++ b/docshell/base/nsDocShell.cpp
 | 
			
		||||
@@ -4204,8 +4204,8 @@ nsDocShell::IsPrintingOrPP(bool aDisplayErrorDialog)
 | 
			
		||||
 bool
 | 
			
		||||
 nsDocShell::IsNavigationAllowed(bool aDisplayPrintErrorDialog)
 | 
			
		||||
 {
 | 
			
		||||
-  bool isAllowed = !IsPrintingOrPP(aDisplayPrintErrorDialog) && !mFiredUnloadEvent;
 | 
			
		||||
-  if (!isAllowed) {
 | 
			
		||||
+  bool isAllowed = !IsPrintingOrPP(aDisplayPrintErrorDialog) &&
 | 
			
		||||
+                   !mFiredUnloadEvent && !mBlockNavigation;  if (!isAllowed) {
 | 
			
		||||
     return false;
 | 
			
		||||
   }
 | 
			
		||||
   if (!mContentViewer) {
 | 
			
		||||
@@ -9321,13 +9321,18 @@ nsDocShell::InternalLoad(nsIURI * aURI,
 | 
			
		||||
             GetCurScrollPos(ScrollOrientation_X, &cx);
 | 
			
		||||
             GetCurScrollPos(ScrollOrientation_Y, &cy);
 | 
			
		||||
 
 | 
			
		||||
-            // ScrollToAnchor doesn't necessarily cause us to scroll the window;
 | 
			
		||||
-            // the function decides whether a scroll is appropriate based on the
 | 
			
		||||
-            // arguments it receives.  But even if we don't end up scrolling,
 | 
			
		||||
-            // ScrollToAnchor performs other important tasks, such as informing
 | 
			
		||||
-            // the presShell that we have a new hash.  See bug 680257.
 | 
			
		||||
-            rv = ScrollToAnchor(curHash, newHash, aLoadType);
 | 
			
		||||
-            NS_ENSURE_SUCCESS(rv, rv);
 | 
			
		||||
+            {
 | 
			
		||||
+                AutoRestore<bool> scrollingToAnchor(mBlockNavigation);
 | 
			
		||||
+                mBlockNavigation = true;
 | 
			
		||||
+
 | 
			
		||||
+                // ScrollToAnchor doesn't necessarily cause us to scroll the window;
 | 
			
		||||
+                // the function decides whether a scroll is appropriate based on the
 | 
			
		||||
+                // arguments it receives.  But even if we don't end up scrolling,
 | 
			
		||||
+                // ScrollToAnchor performs other important tasks, such as informing
 | 
			
		||||
+                // the presShell that we have a new hash.  See bug 680257.
 | 
			
		||||
+                rv = ScrollToAnchor(curHash, newHash, aLoadType);
 | 
			
		||||
+                NS_ENSURE_SUCCESS(rv, rv);
 | 
			
		||||
+            }
 | 
			
		||||
 
 | 
			
		||||
             // Reset mLoadType to its original value once we exit this block,
 | 
			
		||||
             // because this short-circuited load might have started after a
 | 
			
		||||
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
 | 
			
		||||
index c191777..be353ee 100644
 | 
			
		||||
--- a/docshell/base/nsDocShell.h
 | 
			
		||||
+++ b/docshell/base/nsDocShell.h
 | 
			
		||||
@@ -835,6 +835,7 @@ protected:
 | 
			
		||||
     bool                       mInPrivateBrowsing;
 | 
			
		||||
     bool                       mUseRemoteTabs;
 | 
			
		||||
     bool                       mDeviceSizeIsPageSize;
 | 
			
		||||
+    bool                       mBlockNavigation;
 | 
			
		||||
 
 | 
			
		||||
     // Because scriptability depends on the mAllowJavascript values of our
 | 
			
		||||
     // ancestors, we cache the effective scriptability and recompute it when
 | 
			
		||||
-- 
 | 
			
		||||
2.2.1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										28
									
								
								gnu/packages/patches/icecat-CVE-2015-0818-pt2.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								gnu/packages/patches/icecat-CVE-2015-0818-pt2.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,28 @@
 | 
			
		|||
From 83364c747c421b191f9d4012896a9e5a1d5223ad Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Kyle Huey <khuey@kylehuey.com>
 | 
			
		||||
Date: Fri, 20 Mar 2015 19:15:13 -0700
 | 
			
		||||
Subject: [PATCH] Bug 1144988. r=bz a=lmandel
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 docshell/base/nsDocShell.cpp | 3 ++-
 | 
			
		||||
 1 file changed, 2 insertions(+), 1 deletion(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
 | 
			
		||||
index 4cddcef..bdf88a5cf 100644
 | 
			
		||||
--- a/docshell/base/nsDocShell.cpp
 | 
			
		||||
+++ b/docshell/base/nsDocShell.cpp
 | 
			
		||||
@@ -1322,9 +1322,10 @@ nsDocShell::LoadURI(nsIURI * aURI,
 | 
			
		||||
     
 | 
			
		||||
     // Note: we allow loads to get through here even if mFiredUnloadEvent is
 | 
			
		||||
     // true; that case will get handled in LoadInternal or LoadHistoryEntry.
 | 
			
		||||
-    if (IsPrintingOrPP()) {
 | 
			
		||||
+    if (IsPrintingOrPP() || mBlockNavigation) {
 | 
			
		||||
       return NS_OK; // JS may not handle returning of an error code
 | 
			
		||||
     }
 | 
			
		||||
+
 | 
			
		||||
     nsCOMPtr<nsIURI> referrer;
 | 
			
		||||
     nsCOMPtr<nsIInputStream> postStream;
 | 
			
		||||
     nsCOMPtr<nsIInputStream> headersStream;
 | 
			
		||||
-- 
 | 
			
		||||
2.2.1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										25
									
								
								gnu/packages/patches/icecat-bug-1127780.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								gnu/packages/patches/icecat-bug-1127780.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
From cf1de3d04302841aaa05aed8364da3399cbca9b4 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Bobby Holley <bobbyholley@gmail.com>
 | 
			
		||||
Date: Tue, 17 Feb 2015 17:47:12 -0500
 | 
			
		||||
Subject: [PATCH] Bug 1127780 - Add null check. r=bz, a=bkerensa
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 js/xpconnect/wrappers/XrayWrapper.h | 2 +-
 | 
			
		||||
 1 file changed, 1 insertion(+), 1 deletion(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/js/xpconnect/wrappers/XrayWrapper.h b/js/xpconnect/wrappers/XrayWrapper.h
 | 
			
		||||
index ead095f1..cc8c580 100644
 | 
			
		||||
--- a/js/xpconnect/wrappers/XrayWrapper.h
 | 
			
		||||
+++ b/js/xpconnect/wrappers/XrayWrapper.h
 | 
			
		||||
@@ -131,7 +131,7 @@ class XrayWrapper : public Base {
 | 
			
		||||
     {
 | 
			
		||||
         if (!Base::getPrototypeOf(cx, wrapper, protop))
 | 
			
		||||
             return false;
 | 
			
		||||
-        if (WrapperFactory::IsXrayWrapper(protop))
 | 
			
		||||
+        if (!protop || WrapperFactory::IsXrayWrapper(protop))
 | 
			
		||||
             return true;
 | 
			
		||||
 
 | 
			
		||||
         protop.set(JS_GetObjectPrototype(cx, wrapper));
 | 
			
		||||
-- 
 | 
			
		||||
2.2.1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										76
									
								
								gnu/packages/patches/icecat-bug-1144991.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								gnu/packages/patches/icecat-bug-1144991.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,76 @@
 | 
			
		|||
From ae49ed04f54c2f78d6ba7e545e0099602a3270fa Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Boris Zbarsky <bzbarsky@mit.edu>
 | 
			
		||||
Date: Thu, 19 Mar 2015 18:58:44 -0400
 | 
			
		||||
Subject: [PATCH] Bug 1144991 - Be a bit more restrictive about when a
 | 
			
		||||
 URI_IS_UI_RESOURCE source is allowed to link to a URI_IS_UI_RESOURCE URI that
 | 
			
		||||
 doesn't have the same scheme. r=bholley, a=abillings
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 caps/src/nsScriptSecurityManager.cpp | 38 +++++++++++++++++++++++++-----------
 | 
			
		||||
 1 file changed, 27 insertions(+), 11 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/caps/src/nsScriptSecurityManager.cpp b/caps/src/nsScriptSecurityManager.cpp
 | 
			
		||||
index 3587358..6577b95 100644
 | 
			
		||||
--- a/caps/src/nsScriptSecurityManager.cpp
 | 
			
		||||
+++ b/caps/src/nsScriptSecurityManager.cpp
 | 
			
		||||
@@ -770,12 +770,31 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
 | 
			
		||||
     NS_ENSURE_SUCCESS(rv, rv);
 | 
			
		||||
     if (hasFlags) {
 | 
			
		||||
         if (aFlags & nsIScriptSecurityManager::ALLOW_CHROME) {
 | 
			
		||||
+
 | 
			
		||||
+            // For now, don't change behavior for resource:// or moz-icon:// and
 | 
			
		||||
+            // just allow them.
 | 
			
		||||
             if (!targetScheme.EqualsLiteral("chrome")) {
 | 
			
		||||
-                // for now don't change behavior for resource: or moz-icon:
 | 
			
		||||
                 return NS_OK;
 | 
			
		||||
             }
 | 
			
		||||
 
 | 
			
		||||
-            // allow load only if chrome package is whitelisted
 | 
			
		||||
+            // Allow a URI_IS_UI_RESOURCE source to link to a URI_IS_UI_RESOURCE
 | 
			
		||||
+            // target if ALLOW_CHROME is set.
 | 
			
		||||
+            //
 | 
			
		||||
+            // ALLOW_CHROME is a flag that we pass on all loads _except_ docshell
 | 
			
		||||
+            // loads (since docshell loads run the loaded content with its origin
 | 
			
		||||
+            // principal). So we're effectively allowing resource://, chrome://,
 | 
			
		||||
+            // and moz-icon:// source URIs to load resource://, chrome://, and
 | 
			
		||||
+            // moz-icon:// files, so long as they're not loading it as a document.
 | 
			
		||||
+            bool sourceIsUIResource;
 | 
			
		||||
+            rv = NS_URIChainHasFlags(sourceBaseURI,
 | 
			
		||||
+                                     nsIProtocolHandler::URI_IS_UI_RESOURCE,
 | 
			
		||||
+                                     &sourceIsUIResource);
 | 
			
		||||
+            NS_ENSURE_SUCCESS(rv, rv);
 | 
			
		||||
+            if (sourceIsUIResource) {
 | 
			
		||||
+                return NS_OK;
 | 
			
		||||
+            }
 | 
			
		||||
+
 | 
			
		||||
+            // Allow the load only if the chrome package is whitelisted.
 | 
			
		||||
             nsCOMPtr<nsIXULChromeRegistry> reg(do_GetService(
 | 
			
		||||
                                                  NS_CHROMEREGISTRY_CONTRACTID));
 | 
			
		||||
             if (reg) {
 | 
			
		||||
@@ -787,17 +806,14 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
 | 
			
		||||
             }
 | 
			
		||||
         }
 | 
			
		||||
 
 | 
			
		||||
-        // resource: and chrome: are equivalent, securitywise
 | 
			
		||||
-        // That's bogus!!  Fix this.  But watch out for
 | 
			
		||||
-        // the view-source stylesheet?
 | 
			
		||||
-        bool sourceIsChrome;
 | 
			
		||||
-        rv = NS_URIChainHasFlags(sourceBaseURI,
 | 
			
		||||
-                                 nsIProtocolHandler::URI_IS_UI_RESOURCE,
 | 
			
		||||
-                                 &sourceIsChrome);
 | 
			
		||||
-        NS_ENSURE_SUCCESS(rv, rv);
 | 
			
		||||
-        if (sourceIsChrome) {
 | 
			
		||||
+        // Special-case the hidden window: it's allowed to load
 | 
			
		||||
+        // URI_IS_UI_RESOURCE no matter what.  Bug 1145470 tracks removing this.
 | 
			
		||||
+        nsAutoCString sourceSpec;
 | 
			
		||||
+        if (NS_SUCCEEDED(sourceBaseURI->GetSpec(sourceSpec)) &&
 | 
			
		||||
+            sourceSpec.EqualsLiteral("resource://gre-resources/hiddenWindow.html")) {
 | 
			
		||||
             return NS_OK;
 | 
			
		||||
         }
 | 
			
		||||
+
 | 
			
		||||
         if (reportErrors) {
 | 
			
		||||
             ReportError(nullptr, errorTag, sourceURI, aTargetURI);
 | 
			
		||||
         }
 | 
			
		||||
-- 
 | 
			
		||||
2.2.1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										43
									
								
								gnu/packages/patches/icecat-bug-1145870.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								gnu/packages/patches/icecat-bug-1145870.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
From a40e2ebc2ab57dacb539d4e49ed4193764ff7112 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Kyle Huey <khuey@kylehuey.com>
 | 
			
		||||
Date: Fri, 20 Mar 2015 19:05:56 -0700
 | 
			
		||||
Subject: [PATCH] Bug 1145870. r=bz a=lmandel
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 docshell/base/nsDocShell.cpp | 6 ++++--
 | 
			
		||||
 1 file changed, 4 insertions(+), 2 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
 | 
			
		||||
index 14ff3f2..4cddcef 100644
 | 
			
		||||
--- a/docshell/base/nsDocShell.cpp
 | 
			
		||||
+++ b/docshell/base/nsDocShell.cpp
 | 
			
		||||
@@ -8900,6 +8900,8 @@ nsDocShell::InternalLoad(nsIURI * aURI,
 | 
			
		||||
 
 | 
			
		||||
     NS_ENSURE_TRUE(!mIsBeingDestroyed, NS_ERROR_NOT_AVAILABLE);
 | 
			
		||||
 
 | 
			
		||||
+    NS_ENSURE_TRUE(!mBlockNavigation, NS_ERROR_UNEXPECTED);
 | 
			
		||||
+
 | 
			
		||||
     // wyciwyg urls can only be loaded through history. Any normal load of
 | 
			
		||||
     // wyciwyg through docshell is  illegal. Disallow such loads.
 | 
			
		||||
     if (aLoadType & LOAD_CMD_NORMAL) {
 | 
			
		||||
@@ -12570,7 +12572,7 @@ nsDocShell::OnLinkClick(nsIContent* aContent,
 | 
			
		||||
 {
 | 
			
		||||
   NS_ASSERTION(NS_IsMainThread(), "wrong thread");
 | 
			
		||||
 
 | 
			
		||||
-  if (!IsOKToLoadURI(aURI)) {
 | 
			
		||||
+  if (!IsOKToLoadURI(aURI) || mBlockNavigation) {
 | 
			
		||||
     return NS_OK;
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
@@ -12626,7 +12628,7 @@ nsDocShell::OnLinkClickSync(nsIContent *aContent,
 | 
			
		||||
     *aRequest = nullptr;
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
-  if (!IsOKToLoadURI(aURI)) {
 | 
			
		||||
+  if (!IsOKToLoadURI(aURI) || mBlockNavigation) {
 | 
			
		||||
     return NS_OK;
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
-- 
 | 
			
		||||
2.2.1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										162
									
								
								gnu/packages/patches/icecat-bug-1146339.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										162
									
								
								gnu/packages/patches/icecat-bug-1146339.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,162 @@
 | 
			
		|||
From 4ca86283a71427f27e810d77c8e75418f6428457 Mon Sep 17 00:00:00 2001
 | 
			
		||||
From: Olli Pettay <Olli.Pettay@helsinki.fi>
 | 
			
		||||
Date: Mon, 23 Mar 2015 22:23:53 -0400
 | 
			
		||||
Subject: [PATCH] Bug 1146339 - Do anchor scrolling right before dispatching
 | 
			
		||||
 popstate/hashchange. r=bz, a=lmandel
 | 
			
		||||
 | 
			
		||||
---
 | 
			
		||||
 docshell/base/nsDocShell.cpp | 64 +++++++++++++++++++++-----------------------
 | 
			
		||||
 docshell/base/nsDocShell.h   |  1 -
 | 
			
		||||
 2 files changed, 30 insertions(+), 35 deletions(-)
 | 
			
		||||
 | 
			
		||||
diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp
 | 
			
		||||
index bdf88a5cf..efb6a6e 100644
 | 
			
		||||
--- a/docshell/base/nsDocShell.cpp
 | 
			
		||||
+++ b/docshell/base/nsDocShell.cpp
 | 
			
		||||
@@ -1322,7 +1322,7 @@ nsDocShell::LoadURI(nsIURI * aURI,
 | 
			
		||||
     
 | 
			
		||||
     // Note: we allow loads to get through here even if mFiredUnloadEvent is
 | 
			
		||||
     // true; that case will get handled in LoadInternal or LoadHistoryEntry.
 | 
			
		||||
-    if (IsPrintingOrPP() || mBlockNavigation) {
 | 
			
		||||
+    if (IsPrintingOrPP()) {
 | 
			
		||||
       return NS_OK; // JS may not handle returning of an error code
 | 
			
		||||
     }
 | 
			
		||||
 
 | 
			
		||||
@@ -4206,7 +4206,8 @@ bool
 | 
			
		||||
 nsDocShell::IsNavigationAllowed(bool aDisplayPrintErrorDialog)
 | 
			
		||||
 {
 | 
			
		||||
   bool isAllowed = !IsPrintingOrPP(aDisplayPrintErrorDialog) &&
 | 
			
		||||
-                   !mFiredUnloadEvent && !mBlockNavigation;  if (!isAllowed) {
 | 
			
		||||
+                   !mFiredUnloadEvent;
 | 
			
		||||
+  if (!isAllowed) {
 | 
			
		||||
     return false;
 | 
			
		||||
   }
 | 
			
		||||
   if (!mContentViewer) {
 | 
			
		||||
@@ -8901,8 +8902,6 @@ nsDocShell::InternalLoad(nsIURI * aURI,
 | 
			
		||||
 
 | 
			
		||||
     NS_ENSURE_TRUE(!mIsBeingDestroyed, NS_ERROR_NOT_AVAILABLE);
 | 
			
		||||
 
 | 
			
		||||
-    NS_ENSURE_TRUE(!mBlockNavigation, NS_ERROR_UNEXPECTED);
 | 
			
		||||
-
 | 
			
		||||
     // wyciwyg urls can only be loaded through history. Any normal load of
 | 
			
		||||
     // wyciwyg through docshell is  illegal. Disallow such loads.
 | 
			
		||||
     if (aLoadType & LOAD_CMD_NORMAL) {
 | 
			
		||||
@@ -9324,19 +9323,6 @@ nsDocShell::InternalLoad(nsIURI * aURI,
 | 
			
		||||
             GetCurScrollPos(ScrollOrientation_X, &cx);
 | 
			
		||||
             GetCurScrollPos(ScrollOrientation_Y, &cy);
 | 
			
		||||
 
 | 
			
		||||
-            {
 | 
			
		||||
-                AutoRestore<bool> scrollingToAnchor(mBlockNavigation);
 | 
			
		||||
-                mBlockNavigation = true;
 | 
			
		||||
-
 | 
			
		||||
-                // ScrollToAnchor doesn't necessarily cause us to scroll the window;
 | 
			
		||||
-                // the function decides whether a scroll is appropriate based on the
 | 
			
		||||
-                // arguments it receives.  But even if we don't end up scrolling,
 | 
			
		||||
-                // ScrollToAnchor performs other important tasks, such as informing
 | 
			
		||||
-                // the presShell that we have a new hash.  See bug 680257.
 | 
			
		||||
-                rv = ScrollToAnchor(curHash, newHash, aLoadType);
 | 
			
		||||
-                NS_ENSURE_SUCCESS(rv, rv);
 | 
			
		||||
-            }
 | 
			
		||||
-
 | 
			
		||||
             // Reset mLoadType to its original value once we exit this block,
 | 
			
		||||
             // because this short-circuited load might have started after a
 | 
			
		||||
             // normal, network load, and we don't want to clobber its load type.
 | 
			
		||||
@@ -9424,16 +9410,6 @@ nsDocShell::InternalLoad(nsIURI * aURI,
 | 
			
		||||
                     mOSHE->SetCacheKey(cacheKey);
 | 
			
		||||
             }
 | 
			
		||||
 
 | 
			
		||||
-            /* restore previous position of scroller(s), if we're moving
 | 
			
		||||
-             * back in history (bug 59774)
 | 
			
		||||
-             */
 | 
			
		||||
-            if (mOSHE && (aLoadType == LOAD_HISTORY || aLoadType == LOAD_RELOAD_NORMAL))
 | 
			
		||||
-            {
 | 
			
		||||
-                nscoord bx, by;
 | 
			
		||||
-                mOSHE->GetScrollPosition(&bx, &by);
 | 
			
		||||
-                SetCurScrollPosEx(bx, by);
 | 
			
		||||
-            }
 | 
			
		||||
-
 | 
			
		||||
             /* Restore the original LSHE if we were loading something
 | 
			
		||||
              * while short-circuited load was initiated.
 | 
			
		||||
              */
 | 
			
		||||
@@ -9471,12 +9447,36 @@ nsDocShell::InternalLoad(nsIURI * aURI,
 | 
			
		||||
 
 | 
			
		||||
             SetDocCurrentStateObj(mOSHE);
 | 
			
		||||
 
 | 
			
		||||
+            // Inform the favicon service that the favicon for oldURI also
 | 
			
		||||
+            // applies to aURI.
 | 
			
		||||
+            CopyFavicon(currentURI, aURI, mInPrivateBrowsing);
 | 
			
		||||
+
 | 
			
		||||
+            nsRefPtr<nsGlobalWindow> win = mScriptGlobal ?
 | 
			
		||||
+              mScriptGlobal->GetCurrentInnerWindowInternal() : nullptr;
 | 
			
		||||
+
 | 
			
		||||
+            // ScrollToAnchor doesn't necessarily cause us to scroll the window;
 | 
			
		||||
+            // the function decides whether a scroll is appropriate based on the
 | 
			
		||||
+            // arguments it receives.  But even if we don't end up scrolling,
 | 
			
		||||
+            // ScrollToAnchor performs other important tasks, such as informing
 | 
			
		||||
+            // the presShell that we have a new hash.  See bug 680257.
 | 
			
		||||
+            rv = ScrollToAnchor(curHash, newHash, aLoadType);
 | 
			
		||||
+            NS_ENSURE_SUCCESS(rv, rv);
 | 
			
		||||
+
 | 
			
		||||
+            /* restore previous position of scroller(s), if we're moving
 | 
			
		||||
+             * back in history (bug 59774)
 | 
			
		||||
+             */
 | 
			
		||||
+            if (mOSHE && (aLoadType == LOAD_HISTORY ||
 | 
			
		||||
+                          aLoadType == LOAD_RELOAD_NORMAL)) {
 | 
			
		||||
+              nscoord bx, by;
 | 
			
		||||
+              mOSHE->GetScrollPosition(&bx, &by);
 | 
			
		||||
+              SetCurScrollPosEx(bx, by);
 | 
			
		||||
+            }
 | 
			
		||||
+
 | 
			
		||||
             // Dispatch the popstate and hashchange events, as appropriate.
 | 
			
		||||
             //
 | 
			
		||||
             // The event dispatch below can cause us to re-enter script and
 | 
			
		||||
             // destroy the docshell, nulling out mScriptGlobal. Hold a stack
 | 
			
		||||
             // reference to avoid null derefs. See bug 914521.
 | 
			
		||||
-            nsRefPtr<nsGlobalWindow> win = mScriptGlobal;
 | 
			
		||||
             if (win) {
 | 
			
		||||
                 // Fire a hashchange event URIs differ, and only in their hashes.
 | 
			
		||||
                 bool doHashchange = sameExceptHashes && !curHash.Equals(newHash);
 | 
			
		||||
@@ -9492,10 +9492,6 @@ nsDocShell::InternalLoad(nsIURI * aURI,
 | 
			
		||||
                 }
 | 
			
		||||
             }
 | 
			
		||||
 
 | 
			
		||||
-            // Inform the favicon service that the favicon for oldURI also
 | 
			
		||||
-            // applies to aURI.
 | 
			
		||||
-            CopyFavicon(currentURI, aURI, mInPrivateBrowsing);
 | 
			
		||||
-
 | 
			
		||||
             return NS_OK;
 | 
			
		||||
         }
 | 
			
		||||
     }
 | 
			
		||||
@@ -12573,7 +12569,7 @@ nsDocShell::OnLinkClick(nsIContent* aContent,
 | 
			
		||||
 {
 | 
			
		||||
   NS_ASSERTION(NS_IsMainThread(), "wrong thread");
 | 
			
		||||
 
 | 
			
		||||
-  if (!IsOKToLoadURI(aURI) || mBlockNavigation) {
 | 
			
		||||
+  if (!IsOKToLoadURI(aURI)) {
 | 
			
		||||
     return NS_OK;
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
@@ -12629,7 +12625,7 @@ nsDocShell::OnLinkClickSync(nsIContent *aContent,
 | 
			
		||||
     *aRequest = nullptr;
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
-  if (!IsOKToLoadURI(aURI) || mBlockNavigation) {
 | 
			
		||||
+  if (!IsOKToLoadURI(aURI)) {
 | 
			
		||||
     return NS_OK;
 | 
			
		||||
   }
 | 
			
		||||
 
 | 
			
		||||
diff --git a/docshell/base/nsDocShell.h b/docshell/base/nsDocShell.h
 | 
			
		||||
index be353ee..c191777 100644
 | 
			
		||||
--- a/docshell/base/nsDocShell.h
 | 
			
		||||
+++ b/docshell/base/nsDocShell.h
 | 
			
		||||
@@ -835,7 +835,6 @@ protected:
 | 
			
		||||
     bool                       mInPrivateBrowsing;
 | 
			
		||||
     bool                       mUseRemoteTabs;
 | 
			
		||||
     bool                       mDeviceSizeIsPageSize;
 | 
			
		||||
-    bool                       mBlockNavigation;
 | 
			
		||||
 
 | 
			
		||||
     // Because scriptability depends on the mAllowJavascript values of our
 | 
			
		||||
     // ancestors, we cache the effective scriptability and recompute it when
 | 
			
		||||
-- 
 | 
			
		||||
2.2.1
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										13
									
								
								gnu/packages/patches/lirc-localstatedir.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								gnu/packages/patches/lirc-localstatedir.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
Do not try to create $localstatedir as we cannot do this when it is /var.
 | 
			
		||||
 | 
			
		||||
--- lirc-0.9.2a/daemons/Makefile.in
 | 
			
		||||
+++ lirc-0.9.2a/daemons/Makefile.in
 | 
			
		||||
@@ -790,9 +790,6 @@
 | 
			
		||||
 	uninstall-local uninstall-sbinPROGRAMS
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
-install-exec-local:
 | 
			
		||||
-	test -d  $(DESTDIR)$(varrundir)/$(PACKAGE) \
 | 
			
		||||
-		 || mkdir -p $(DESTDIR)$(varrundir)/$(PACKAGE)
 | 
			
		||||
 uninstall-local:
 | 
			
		||||
 	-$(RM) $(DESTDIR)$(varrundir)/$(PACKAGE)/lircd
 | 
			
		||||
							
								
								
									
										324
									
								
								gnu/packages/patches/portaudio-audacity-compat.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										324
									
								
								gnu/packages/patches/portaudio-audacity-compat.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,324 @@
 | 
			
		|||
Description: Add features needed to make portmixer work with audacity.
 | 
			
		||||
Author: Audacity Team
 | 
			
		||||
Last-Update: 2011-12-07
 | 
			
		||||
 | 
			
		||||
See <http://music.columbia.edu/pipermail/portaudio/2015-March/016611.html>.
 | 
			
		||||
 | 
			
		||||
--- a/include/pa_win_ds.h
 | 
			
		||||
+++ b/include/pa_win_ds.h
 | 
			
		||||
@@ -89,6 +89,21 @@
 | 
			
		||||
 
 | 
			
		||||
 }PaWinDirectSoundStreamInfo;
 | 
			
		||||
 
 | 
			
		||||
+/** Retrieve the GUID of the input device.
 | 
			
		||||
+
 | 
			
		||||
+ @param stream The stream to query.
 | 
			
		||||
+
 | 
			
		||||
+ @return A pointer to the GUID, or NULL if none.
 | 
			
		||||
+*/
 | 
			
		||||
+LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
 | 
			
		||||
+
 | 
			
		||||
+/** Retrieve the GUID of the output device.
 | 
			
		||||
+
 | 
			
		||||
+ @param stream The stream to query.
 | 
			
		||||
+
 | 
			
		||||
+ @return A pointer to the GUID, or NULL if none.
 | 
			
		||||
+*/
 | 
			
		||||
+LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
 #ifdef __cplusplus
 | 
			
		||||
--- a/include/portaudio.h
 | 
			
		||||
+++ b/include/portaudio.h
 | 
			
		||||
@@ -1146,6 +1146,15 @@
 | 
			
		||||
 signed long Pa_GetStreamWriteAvailable( PaStream* stream );
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
+/** Retrieve the host type handling an open stream.
 | 
			
		||||
+
 | 
			
		||||
+ @return Returns a non-negative value representing the host API type
 | 
			
		||||
+ handling an open stream or, a PaErrorCode (which are always negative)
 | 
			
		||||
+ if PortAudio is not initialized or an error is encountered.
 | 
			
		||||
+*/
 | 
			
		||||
+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
 | 
			
		||||
+
 | 
			
		||||
+
 | 
			
		||||
 /* Miscellaneous utilities */
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
--- /dev/null
 | 
			
		||||
+++ b/include/pa_unix_oss.h
 | 
			
		||||
@@ -0,0 +1,104 @@
 | 
			
		||||
+#ifndef PA_UNIX_OSS_H
 | 
			
		||||
+#define PA_UNIX_OSS_H
 | 
			
		||||
+
 | 
			
		||||
+/*
 | 
			
		||||
+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
 | 
			
		||||
+ * PortAudio Portable Real-Time Audio Library
 | 
			
		||||
+ * OSS-specific extensions
 | 
			
		||||
+ *
 | 
			
		||||
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
 | 
			
		||||
+ *
 | 
			
		||||
+ * Permission is hereby granted, free of charge, to any person obtaining
 | 
			
		||||
+ * a copy of this software and associated documentation files
 | 
			
		||||
+ * (the "Software"), to deal in the Software without restriction,
 | 
			
		||||
+ * including without limitation the rights to use, copy, modify, merge,
 | 
			
		||||
+ * publish, distribute, sublicense, and/or sell copies of the Software,
 | 
			
		||||
+ * and to permit persons to whom the Software is furnished to do so,
 | 
			
		||||
+ * subject to the following conditions:
 | 
			
		||||
+ *
 | 
			
		||||
+ * The above copyright notice and this permission notice shall be
 | 
			
		||||
+ * included in all copies or substantial portions of the Software.
 | 
			
		||||
+ *
 | 
			
		||||
+ * Any person wishing to distribute modifications to the Software is
 | 
			
		||||
+ * requested to send the modifications to the original developer so that
 | 
			
		||||
+ * they can be incorporated into the canonical version.
 | 
			
		||||
+ *
 | 
			
		||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 | 
			
		||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 | 
			
		||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 | 
			
		||||
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
 | 
			
		||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 | 
			
		||||
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 | 
			
		||||
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
+ *
 | 
			
		||||
+ */
 | 
			
		||||
+
 | 
			
		||||
+/** @file
 | 
			
		||||
+ * OSS-specific PortAudio API extension header file.
 | 
			
		||||
+ */
 | 
			
		||||
+
 | 
			
		||||
+#ifdef __cplusplus
 | 
			
		||||
+extern "C" {
 | 
			
		||||
+#endif
 | 
			
		||||
+
 | 
			
		||||
+const char *PaOSS_GetStreamInputDevice( PaStream *s );
 | 
			
		||||
+
 | 
			
		||||
+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
 | 
			
		||||
+
 | 
			
		||||
+#ifdef __cplusplus
 | 
			
		||||
+}
 | 
			
		||||
+#endif
 | 
			
		||||
+
 | 
			
		||||
+#endif
 | 
			
		||||
+#ifndef PA_UNIX_OSS_H
 | 
			
		||||
+#define PA_UNIX_OSS_H
 | 
			
		||||
+
 | 
			
		||||
+/*
 | 
			
		||||
+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
 | 
			
		||||
+ * PortAudio Portable Real-Time Audio Library
 | 
			
		||||
+ * OSS-specific extensions
 | 
			
		||||
+ *
 | 
			
		||||
+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
 | 
			
		||||
+ *
 | 
			
		||||
+ * Permission is hereby granted, free of charge, to any person obtaining
 | 
			
		||||
+ * a copy of this software and associated documentation files
 | 
			
		||||
+ * (the "Software"), to deal in the Software without restriction,
 | 
			
		||||
+ * including without limitation the rights to use, copy, modify, merge,
 | 
			
		||||
+ * publish, distribute, sublicense, and/or sell copies of the Software,
 | 
			
		||||
+ * and to permit persons to whom the Software is furnished to do so,
 | 
			
		||||
+ * subject to the following conditions:
 | 
			
		||||
+ *
 | 
			
		||||
+ * The above copyright notice and this permission notice shall be
 | 
			
		||||
+ * included in all copies or substantial portions of the Software.
 | 
			
		||||
+ *
 | 
			
		||||
+ * Any person wishing to distribute modifications to the Software is
 | 
			
		||||
+ * requested to send the modifications to the original developer so that
 | 
			
		||||
+ * they can be incorporated into the canonical version.
 | 
			
		||||
+ *
 | 
			
		||||
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 | 
			
		||||
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 | 
			
		||||
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 | 
			
		||||
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
 | 
			
		||||
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 | 
			
		||||
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 | 
			
		||||
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
			
		||||
+ *
 | 
			
		||||
+ */
 | 
			
		||||
+
 | 
			
		||||
+/** @file
 | 
			
		||||
+ * OSS-specific PortAudio API extension header file.
 | 
			
		||||
+ */
 | 
			
		||||
+
 | 
			
		||||
+#ifdef __cplusplus
 | 
			
		||||
+extern "C" {
 | 
			
		||||
+#endif
 | 
			
		||||
+
 | 
			
		||||
+const char *PaOSS_GetStreamInputDevice( PaStream *s );
 | 
			
		||||
+
 | 
			
		||||
+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
 | 
			
		||||
+
 | 
			
		||||
+#ifdef __cplusplus
 | 
			
		||||
+}
 | 
			
		||||
+#endif
 | 
			
		||||
+
 | 
			
		||||
+#endif
 | 
			
		||||
--- a/src/common/pa_front.c
 | 
			
		||||
+++ b/src/common/pa_front.c
 | 
			
		||||
@@ -1216,8 +1216,10 @@
 | 
			
		||||
                                   hostApiInputParametersPtr, hostApiOutputParametersPtr,
 | 
			
		||||
                                   sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
 | 
			
		||||
 
 | 
			
		||||
-    if( result == paNoError )
 | 
			
		||||
+    if( result == paNoError ) {
 | 
			
		||||
         AddOpenStream( *stream );
 | 
			
		||||
+        PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
 | 
			
		||||
+    }
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
     PA_LOGAPI(("Pa_OpenStream returned:\n" ));
 | 
			
		||||
@@ -1729,6 +1731,32 @@
 | 
			
		||||
     return result;
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
 | 
			
		||||
+{
 | 
			
		||||
+    PaError error = PaUtil_ValidateStreamPointer( stream );
 | 
			
		||||
+    PaHostApiTypeId result;
 | 
			
		||||
+
 | 
			
		||||
+#ifdef PA_LOG_API_CALLS
 | 
			
		||||
+    PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
 | 
			
		||||
+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
 | 
			
		||||
+#endif
 | 
			
		||||
+
 | 
			
		||||
+    if( error == paNoError )
 | 
			
		||||
+    {
 | 
			
		||||
+        result = PA_STREAM_REP(stream)->hostApiType;
 | 
			
		||||
+    }
 | 
			
		||||
+    else
 | 
			
		||||
+    {
 | 
			
		||||
+        result = (PaHostApiTypeId) error;
 | 
			
		||||
+    }
 | 
			
		||||
+
 | 
			
		||||
+#ifdef PA_LOG_API_CALLS
 | 
			
		||||
+    PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
 | 
			
		||||
+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
 | 
			
		||||
+#endif
 | 
			
		||||
+
 | 
			
		||||
+    return result;
 | 
			
		||||
+}
 | 
			
		||||
 
 | 
			
		||||
 PaError Pa_GetSampleSize( PaSampleFormat format )
 | 
			
		||||
 {
 | 
			
		||||
--- a/src/common/pa_stream.c
 | 
			
		||||
+++ b/src/common/pa_stream.c
 | 
			
		||||
@@ -93,6 +93,8 @@
 | 
			
		||||
     streamRepresentation->streamInfo.inputLatency = 0.;
 | 
			
		||||
     streamRepresentation->streamInfo.outputLatency = 0.;
 | 
			
		||||
     streamRepresentation->streamInfo.sampleRate = 0.;
 | 
			
		||||
+
 | 
			
		||||
+    streamRepresentation->hostApiType = 0;
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
--- a/src/common/pa_stream.h
 | 
			
		||||
+++ b/src/common/pa_stream.h
 | 
			
		||||
@@ -152,6 +152,7 @@
 | 
			
		||||
     PaStreamFinishedCallback *streamFinishedCallback;
 | 
			
		||||
     void *userData;
 | 
			
		||||
     PaStreamInfo streamInfo;
 | 
			
		||||
+    PaHostApiTypeId hostApiType;
 | 
			
		||||
 } PaUtilStreamRepresentation;
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
--- a/src/hostapi/coreaudio/pa_mac_core_blocking.c
 | 
			
		||||
+++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c
 | 
			
		||||
@@ -66,6 +66,9 @@
 | 
			
		||||
 #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
 | 
			
		||||
 # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
 | 
			
		||||
 # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
 | 
			
		||||
+#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
 | 
			
		||||
+# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
 | 
			
		||||
+# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
 | 
			
		||||
 #else
 | 
			
		||||
 # include <libkern/OSAtomic.h>
 | 
			
		||||
 #endif
 | 
			
		||||
--- a/src/hostapi/alsa/pa_linux_alsa.c
 | 
			
		||||
+++ b/src/hostapi/alsa/pa_linux_alsa.c
 | 
			
		||||
@@ -611,6 +611,7 @@
 | 
			
		||||
     StreamDirection streamDir;
 | 
			
		||||
 
 | 
			
		||||
     snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */
 | 
			
		||||
+    int card;
 | 
			
		||||
 } PaAlsaStreamComponent;
 | 
			
		||||
 
 | 
			
		||||
 /* Implementation specific stream structure */
 | 
			
		||||
@@ -1806,6 +1807,7 @@
 | 
			
		||||
 {
 | 
			
		||||
     PaError result = paNoError;
 | 
			
		||||
     PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError;
 | 
			
		||||
+    snd_pcm_info_t* pcmInfo;
 | 
			
		||||
     assert( params->channelCount > 0 );
 | 
			
		||||
 
 | 
			
		||||
     /* Make sure things have an initial value */
 | 
			
		||||
@@ -1826,6 +1828,9 @@
 | 
			
		||||
     self->device = params->device;
 | 
			
		||||
 
 | 
			
		||||
     PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) );
 | 
			
		||||
+
 | 
			
		||||
+    snd_pcm_info_alloca( &pcmInfo );
 | 
			
		||||
+    self->card = snd_pcm_info_get_card( pcmInfo );
 | 
			
		||||
     self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm );
 | 
			
		||||
 
 | 
			
		||||
     PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) );
 | 
			
		||||
@@ -4519,9 +4524,7 @@
 | 
			
		||||
     /* XXX: More descriptive error? */
 | 
			
		||||
     PA_UNLESS( stream->capture.pcm, paDeviceUnavailable );
 | 
			
		||||
 
 | 
			
		||||
-    alsa_snd_pcm_info_alloca( &pcmInfo );
 | 
			
		||||
-    PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) );
 | 
			
		||||
-    *card = alsa_snd_pcm_info_get_card( pcmInfo );
 | 
			
		||||
+    *card = stream->capture.card;
 | 
			
		||||
 
 | 
			
		||||
 error:
 | 
			
		||||
     return result;
 | 
			
		||||
@@ -4537,9 +4540,7 @@
 | 
			
		||||
     /* XXX: More descriptive error? */
 | 
			
		||||
     PA_UNLESS( stream->playback.pcm, paDeviceUnavailable );
 | 
			
		||||
 
 | 
			
		||||
-    alsa_snd_pcm_info_alloca( &pcmInfo );
 | 
			
		||||
-    PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) );
 | 
			
		||||
-    *card = alsa_snd_pcm_info_get_card( pcmInfo );
 | 
			
		||||
+    *card = stream->playback.card;
 | 
			
		||||
 
 | 
			
		||||
 error:
 | 
			
		||||
     return result;
 | 
			
		||||
--- a/src/hostapi/oss/pa_unix_oss.c
 | 
			
		||||
+++ b/src/hostapi/oss/pa_unix_oss.c
 | 
			
		||||
@@ -2028,3 +2028,26 @@
 | 
			
		||||
 #endif
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
+const char *PaOSS_GetStreamInputDevice( PaStream* s )
 | 
			
		||||
+{
 | 
			
		||||
+    PaOssStream *stream = (PaOssStream*)s;
 | 
			
		||||
+
 | 
			
		||||
+    if( stream->capture )
 | 
			
		||||
+    {
 | 
			
		||||
+      return stream->capture->devName;
 | 
			
		||||
+    }
 | 
			
		||||
+
 | 
			
		||||
+   return NULL;
 | 
			
		||||
+}
 | 
			
		||||
+
 | 
			
		||||
+const char *PaOSS_GetStreamOutputDevice( PaStream* s )
 | 
			
		||||
+{
 | 
			
		||||
+    PaOssStream *stream = (PaOssStream*)s;
 | 
			
		||||
+
 | 
			
		||||
+    if( stream->playback )
 | 
			
		||||
+    {
 | 
			
		||||
+      return stream->playback->devName;
 | 
			
		||||
+    }
 | 
			
		||||
+
 | 
			
		||||
+   return NULL;
 | 
			
		||||
+}
 | 
			
		||||
--- a/configure.in
 | 
			
		||||
+++ b/configure.in
 | 
			
		||||
@@ -365,6 +365,7 @@
 | 
			
		||||
                    DLL_LIBS="$DLL_LIBS -lossaudio"
 | 
			
		||||
                    LIBS="$LIBS -lossaudio"
 | 
			
		||||
            fi
 | 
			
		||||
+           INCLUDES="$INCLUDES pa_unix_oss.h"
 | 
			
		||||
            AC_DEFINE(PA_USE_OSS,1)
 | 
			
		||||
         fi
 | 
			
		||||
 
 | 
			
		||||
| 
						 | 
				
			
			@ -2837,6 +2837,34 @@ PNG, PostScript, PDF, and SVG file output.")
 | 
			
		|||
(define-public python2-cairocffi
 | 
			
		||||
  (package-with-python2 python-cairocffi))
 | 
			
		||||
 | 
			
		||||
(define-public python-decorator
 | 
			
		||||
  (package
 | 
			
		||||
    (name "python-decorator")
 | 
			
		||||
    (version "3.4.2")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (string-append
 | 
			
		||||
             "https://pypi.python.org/packages/source/d/decorator/decorator-"
 | 
			
		||||
             version ".tar.gz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "0i2bnlkh0p9gs76hb28mafandcrig2fmv56w9ai6mshxwqn0083k"))))
 | 
			
		||||
    (build-system python-build-system)
 | 
			
		||||
    (arguments '(#:tests? #f)) ; no test target
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("python-setuptools" ,python-setuptools)))
 | 
			
		||||
    (home-page "http://pypi.python.org/pypi/decorator/")
 | 
			
		||||
    (synopsis "Python module to simplify usage of decorators")
 | 
			
		||||
    (description
 | 
			
		||||
      "The aim of the decorator module is to simplify the usage of decorators
 | 
			
		||||
for the average programmer, and to popularize decorators usage giving examples
 | 
			
		||||
of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
 | 
			
		||||
etc.  The core of this module is a decorator factory.")
 | 
			
		||||
    (license license:expat)))
 | 
			
		||||
 | 
			
		||||
(define-public python2-decorator
 | 
			
		||||
  (package-with-python2 python-decorator))
 | 
			
		||||
 | 
			
		||||
(define-public python-ipython
 | 
			
		||||
  (package
 | 
			
		||||
    (name "python-ipython")
 | 
			
		||||
| 
						 | 
				
			
			@ -3307,6 +3335,35 @@ interfaces in an easy and portable manner.")
 | 
			
		|||
(define-public python2-netifaces
 | 
			
		||||
  (package-with-python2 python-netifaces))
 | 
			
		||||
 | 
			
		||||
(define-public python-networkx
 | 
			
		||||
  (package
 | 
			
		||||
    (name "python-networkx")
 | 
			
		||||
    (version "1.9.1")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (string-append
 | 
			
		||||
             "https://pypi.python.org/packages/source/n/networkx/networkx-"
 | 
			
		||||
             version ".tar.gz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "0n8wy0yq1kmdq4wh68mlhwhkndvwzx48lg41a1z0sxxms0wfp033"))))
 | 
			
		||||
    (build-system python-build-system)
 | 
			
		||||
    ;; python-decorator is needed at runtime
 | 
			
		||||
    (propagated-inputs
 | 
			
		||||
     `(("python-decorator" ,python-decorator)))
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("python-setuptools" ,python-setuptools)
 | 
			
		||||
       ("python-nose" ,python-nose)))
 | 
			
		||||
    (home-page "http://networkx.github.io/")
 | 
			
		||||
    (synopsis "Python module for creating and manipulating graphs and networks")
 | 
			
		||||
    (description
 | 
			
		||||
      "NetworkX is a Python package for the creation, manipulation, and study
 | 
			
		||||
of the structure, dynamics, and functions of complex networks.")
 | 
			
		||||
    (license bsd-3)))
 | 
			
		||||
 | 
			
		||||
(define-public python2-networkx
 | 
			
		||||
  (package-with-python2 python-networkx))
 | 
			
		||||
 | 
			
		||||
(define-public snakemake
 | 
			
		||||
  (package
 | 
			
		||||
    (name "snakemake")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 | 
			
		||||
;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
| 
						 | 
				
			
			@ -18,11 +19,13 @@
 | 
			
		|||
 | 
			
		||||
(define-module (gnu packages search)
 | 
			
		||||
  #:use-module ((guix licenses)
 | 
			
		||||
                #:select (gpl2+ bsd-3 x11))
 | 
			
		||||
                #:select (gpl2+ gpl3+ bsd-3 x11))
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module (gnu packages compression)
 | 
			
		||||
  #:use-module (gnu packages check)
 | 
			
		||||
  #:use-module (gnu packages databases)
 | 
			
		||||
  #:use-module (gnu packages linux)
 | 
			
		||||
  #:export (xapian))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -55,4 +58,68 @@ rich set of boolean query operators.")
 | 
			
		|||
    (home-page "http://xapian.org/")
 | 
			
		||||
    (license (list gpl2+ bsd-3 x11))))
 | 
			
		||||
 | 
			
		||||
(define-public libtocc
 | 
			
		||||
  (package
 | 
			
		||||
    (name "libtocc")
 | 
			
		||||
    (version "1.0.1")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (string-append "https://github.com/aidin36/tocc/releases/download/"
 | 
			
		||||
                           "v" version "/tocc-" version ".tar.gz"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32
 | 
			
		||||
         "1kd2jd74m8ksc8s7hh0haz0q0c3n0mr39bbky262kk4l58f1g068"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (native-inputs `(("catch" ,catch-framework)))
 | 
			
		||||
    (inputs `(("unqlite" ,unqlite)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     `(#:phases (modify-phases %standard-phases
 | 
			
		||||
                  (add-before
 | 
			
		||||
                   configure chdir-source
 | 
			
		||||
                   (lambda _ (chdir "libtocc/src")))
 | 
			
		||||
                  (replace
 | 
			
		||||
                   check
 | 
			
		||||
                   (lambda _
 | 
			
		||||
                     (with-directory-excursion "../tests"
 | 
			
		||||
                       (and (zero? (system* "./configure"
 | 
			
		||||
                                            (string-append "CONFIG_SHELL="
 | 
			
		||||
                                                           (which "sh"))
 | 
			
		||||
                                            (string-append "SHELL="
 | 
			
		||||
                                                           (which "sh"))
 | 
			
		||||
                                            "CPPFLAGS=-I../src"
 | 
			
		||||
                                            "LDFLAGS=-L../src/.libs"))
 | 
			
		||||
                            (zero? (system* "make"))
 | 
			
		||||
                            (zero? (system* "./libtocctests")))))))))
 | 
			
		||||
    (home-page "http://t-o-c-c.com/")
 | 
			
		||||
    (synopsis "Tool for Obsessive Compulsive Classifiers")
 | 
			
		||||
    (description
 | 
			
		||||
     "libtocc is the engine of the Tocc project, a tag-based file management
 | 
			
		||||
system.  The goal of Tocc is to provide a better system for classifying files
 | 
			
		||||
that is more flexible than classic file systems that are based on a tree of
 | 
			
		||||
files and directories.")
 | 
			
		||||
    (license gpl3+)))
 | 
			
		||||
 | 
			
		||||
(define-public tocc
 | 
			
		||||
  (package
 | 
			
		||||
    (name "tocc")
 | 
			
		||||
    (version (package-version libtocc))
 | 
			
		||||
    (source (package-source libtocc))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("libtocc" ,libtocc)
 | 
			
		||||
       ("unqlite" ,unqlite)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     `(#:tests? #f                      ;No tests
 | 
			
		||||
       #:phases (modify-phases %standard-phases
 | 
			
		||||
                  (add-after
 | 
			
		||||
                   unpack chdir-source
 | 
			
		||||
                   (lambda _ (chdir "cli/src"))))))
 | 
			
		||||
    (home-page "http://t-o-c-c.com/")
 | 
			
		||||
    (synopsis "Command-line interface to libtocc")
 | 
			
		||||
    (description
 | 
			
		||||
     "Tocc is a tag-based file management system.  This package contains the
 | 
			
		||||
command line tool for interacting with libtocc.")
 | 
			
		||||
    (license gpl3+)))
 | 
			
		||||
 | 
			
		||||
;;; search.scm ends here
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,7 +122,7 @@ a server that supports the SSH-2 protocol.")
 | 
			
		|||
(define-public openssh
 | 
			
		||||
  (package
 | 
			
		||||
   (name "openssh")
 | 
			
		||||
   (version "6.7p1")
 | 
			
		||||
   (version "6.8p1")
 | 
			
		||||
   (source (origin
 | 
			
		||||
            (method url-fetch)
 | 
			
		||||
            (uri (let ((tail (string-append name "-" version ".tar.gz")))
 | 
			
		||||
| 
						 | 
				
			
			@ -131,7 +131,7 @@ a server that supports the SSH-2 protocol.")
 | 
			
		|||
                         (string-append "ftp://ftp2.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/"
 | 
			
		||||
                                        tail))))
 | 
			
		||||
            (sha256 (base32
 | 
			
		||||
                     "01smf9pvn2sk5qs80gkmc9acj07ckawi1b3xxyysp3c5mr73ky5j"))))
 | 
			
		||||
                     "03hnrqvjq6ghg1mp3gkarfxh6g3x1n1vjrzpbc5lh9717vklrxiz"))))
 | 
			
		||||
   (build-system gnu-build-system)
 | 
			
		||||
   (inputs `(("groff" ,groff)
 | 
			
		||||
             ("openssl" ,openssl)
 | 
			
		||||
| 
						 | 
				
			
			@ -149,9 +149,10 @@ a server that supports the SSH-2 protocol.")
 | 
			
		|||
       (alist-cons-before
 | 
			
		||||
        'check 'patch-tests
 | 
			
		||||
        (lambda _
 | 
			
		||||
          ;; remove tests that require the user sshd
 | 
			
		||||
          ;; remove 't-exec' regress target which requires user 'sshd'
 | 
			
		||||
          (substitute* "regress/Makefile"
 | 
			
		||||
            (("t10 t-exec") "t10")))
 | 
			
		||||
            (("^(REGRESS_TARGETS=.*) t-exec(.*)" all pre post)
 | 
			
		||||
             (string-append pre post))))
 | 
			
		||||
       (alist-replace
 | 
			
		||||
        'install
 | 
			
		||||
        (lambda* (#:key (make-flags '()) #:allow-other-keys)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
| 
						 | 
				
			
			@ -32,14 +32,14 @@
 | 
			
		|||
(define-public tor
 | 
			
		||||
  (package
 | 
			
		||||
    (name "tor")
 | 
			
		||||
    (version "0.2.5.10")
 | 
			
		||||
    (version "0.2.5.11")
 | 
			
		||||
    (source (origin
 | 
			
		||||
             (method url-fetch)
 | 
			
		||||
             (uri (string-append "https://www.torproject.org/dist/tor-"
 | 
			
		||||
                                 version ".tar.gz"))
 | 
			
		||||
             (sha256
 | 
			
		||||
              (base32
 | 
			
		||||
               "0fx8qnwh2f8ykfx0np4hyznjfi4xfy96z59pk96y3zyjvjjh5pdk"))))
 | 
			
		||||
               "0sb7ai8r9c0nvdagjrbfqpri6x4njfxv954fxrjv46rzkkpgmq5f"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("zlib" ,zlib)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,12 +24,14 @@
 | 
			
		|||
  #:use-module ((guix licenses)
 | 
			
		||||
                #:select (gpl2 gpl2+ gpl3+ lgpl2.1+ bsd-3 public-domain
 | 
			
		||||
                               fsf-free isc))
 | 
			
		||||
  #:use-module (guix utils)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix git-download)
 | 
			
		||||
  #:use-module (guix build-system cmake)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module (guix build-system python)
 | 
			
		||||
  #:use-module (guix build-system waf)
 | 
			
		||||
  #:use-module (gnu packages)
 | 
			
		||||
  #:use-module (gnu packages algebra)
 | 
			
		||||
  #:use-module (gnu packages audio)
 | 
			
		||||
| 
						 | 
				
			
			@ -56,6 +58,7 @@
 | 
			
		|||
  #:use-module (gnu packages lua)
 | 
			
		||||
  #:use-module (gnu packages mp3)
 | 
			
		||||
  #:use-module (gnu packages ncurses)
 | 
			
		||||
  #:use-module (gnu packages ocr)
 | 
			
		||||
  #:use-module (gnu packages openssl)
 | 
			
		||||
  #:use-module (gnu packages perl)
 | 
			
		||||
  #:use-module (gnu packages pkg-config)
 | 
			
		||||
| 
						 | 
				
			
			@ -69,6 +72,7 @@
 | 
			
		|||
  #:use-module (gnu packages textutils)
 | 
			
		||||
  #:use-module (gnu packages version-control)
 | 
			
		||||
  #:use-module (gnu packages web)
 | 
			
		||||
  #:use-module (gnu packages xdisorg)
 | 
			
		||||
  #:use-module (gnu packages xiph)
 | 
			
		||||
  #:use-module (gnu packages xml)
 | 
			
		||||
  #:use-module (gnu packages xorg)
 | 
			
		||||
| 
						 | 
				
			
			@ -90,6 +94,13 @@
 | 
			
		|||
               (base32
 | 
			
		||||
                "0czccp4fcpf2ykp16xcrzdfmnircz1ynhls334q374xknd5747d2"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (arguments `(#:configure-flags
 | 
			
		||||
                 '(;; FIXME: liba52-0.7.4's config.guess fails on mips64el.
 | 
			
		||||
                   ,@(if (%current-target-system)
 | 
			
		||||
                         '()
 | 
			
		||||
                         (let ((triplet
 | 
			
		||||
                                (nix-system->gnu-triplet (%current-system))))
 | 
			
		||||
                           (list (string-append "--build=" triplet)))))))
 | 
			
		||||
    (home-page "http://liba52.sourceforge.net/")
 | 
			
		||||
    (synopsis "ATSC A/52 stream decoder")
 | 
			
		||||
    (description "liba52 is a library for decoding ATSC A/52 streams.  The
 | 
			
		||||
| 
						 | 
				
			
			@ -195,6 +206,35 @@ developed according to the official standards for DV video: IEC 61834 and
 | 
			
		|||
SMPTE 314M.")
 | 
			
		||||
    (license lgpl2.1+)))
 | 
			
		||||
 | 
			
		||||
(define-public libva
 | 
			
		||||
  (package
 | 
			
		||||
    (name "libva")
 | 
			
		||||
    (version "1.5.1")
 | 
			
		||||
    (source
 | 
			
		||||
     (origin
 | 
			
		||||
       (method url-fetch)
 | 
			
		||||
       (uri (string-append
 | 
			
		||||
             "http://www.freedesktop.org/software/vaapi/releases/libva/libva-"
 | 
			
		||||
             version".tar.bz2"))
 | 
			
		||||
       (sha256
 | 
			
		||||
        (base32 "01d01mm9fgpwzqycmjjcj3in3vvzcibi3f64icsw2sksmmgb4495"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("pkg-config" ,pkg-config)))
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("libdrm" ,libdrm)
 | 
			
		||||
       ("libx11" ,libx11)
 | 
			
		||||
       ("libxext" ,libxext)
 | 
			
		||||
       ("libxfixes" ,libxfixes)
 | 
			
		||||
       ("mesa" ,mesa)))
 | 
			
		||||
    (home-page "http://www.freedesktop.org/wiki/Software/vaapi/")
 | 
			
		||||
    (synopsis "Video acceleration library")
 | 
			
		||||
    (description "The main motivation for VA-API (Video Acceleration API) is
 | 
			
		||||
to enable hardware accelerated video decode/encode at various
 | 
			
		||||
entry-points (VLD, IDCT, Motion Compensation etc.) for prevailing coding
 | 
			
		||||
standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
 | 
			
		||||
    (license expat)))
 | 
			
		||||
 | 
			
		||||
(define-public ffmpeg
 | 
			
		||||
  (package
 | 
			
		||||
    (name "ffmpeg")
 | 
			
		||||
| 
						 | 
				
			
			@ -636,6 +676,91 @@ several areas.")
 | 
			
		|||
    ;; is under lgpl3+, thus the whole project becomes gpl3+.
 | 
			
		||||
    (license gpl3+)))
 | 
			
		||||
 | 
			
		||||
(define-public mpv
 | 
			
		||||
  (package
 | 
			
		||||
    (name "mpv")
 | 
			
		||||
    (version "0.8.3")
 | 
			
		||||
    (source (origin
 | 
			
		||||
              (method url-fetch)
 | 
			
		||||
              (uri (string-append
 | 
			
		||||
                    "https://github.com/mpv-player/mpv/archive/v" version
 | 
			
		||||
                    ".tar.gz"))
 | 
			
		||||
              (sha256
 | 
			
		||||
               (base32
 | 
			
		||||
                "1kw9hr957cxqgm2i94bgqc6sskm6bwhm0akzckilhs460b43h409"))
 | 
			
		||||
              (file-name (string-append name "-" version ".tar.gz"))))
 | 
			
		||||
    (build-system waf-build-system)
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("perl" ,perl)
 | 
			
		||||
       ("pkg-config" ,pkg-config)
 | 
			
		||||
       ("python-docutils" ,python-docutils)))
 | 
			
		||||
    ;; Missing features: libguess, LIRC, Wayland, VDPAU, V4L2
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("alsa-lib" ,alsa-lib)
 | 
			
		||||
       ("enca" ,enca)
 | 
			
		||||
       ("ffmpeg" ,ffmpeg)
 | 
			
		||||
       ("jack" ,jack-2)
 | 
			
		||||
       ("ladspa" ,ladspa)
 | 
			
		||||
       ("lcms" ,lcms)
 | 
			
		||||
       ("libass" ,libass)
 | 
			
		||||
       ("libbluray" ,libbluray)
 | 
			
		||||
       ("libcaca" ,libcaca)
 | 
			
		||||
       ("libbs2b" ,libbs2b)
 | 
			
		||||
       ("libcdio-paranoia" ,libcdio-paranoia)
 | 
			
		||||
       ("libdvdread" ,libdvdread)
 | 
			
		||||
       ("libdvdnav" ,libdvdnav)
 | 
			
		||||
       ("libjpeg" ,libjpeg)
 | 
			
		||||
       ("libva" ,libva)
 | 
			
		||||
       ("libx11" ,libx11)
 | 
			
		||||
       ("libxext" ,libxext)
 | 
			
		||||
       ("libxinerama" ,libxinerama)
 | 
			
		||||
       ("libxrandr" ,libxrandr)
 | 
			
		||||
       ("libxscrnsaver" ,libxscrnsaver)
 | 
			
		||||
       ("libxv" ,libxv)
 | 
			
		||||
       ("lua" ,lua)
 | 
			
		||||
       ("mesa" ,mesa)
 | 
			
		||||
       ("mpg123" ,mpg123)
 | 
			
		||||
       ("pulseaudio" ,pulseaudio)
 | 
			
		||||
       ("rsound" ,rsound)
 | 
			
		||||
       ("samba" ,samba)
 | 
			
		||||
       ("vapoursynth" ,vapoursynth)
 | 
			
		||||
       ("waf" ,(origin
 | 
			
		||||
                 (method url-fetch)
 | 
			
		||||
                 ;; Keep this in sync with the version in the bootstrap.py
 | 
			
		||||
                 ;; script of the source tarball.
 | 
			
		||||
                 (uri "http://www.freehackers.org/~tnagy/release/waf-1.8.4")
 | 
			
		||||
                 (sha256
 | 
			
		||||
                  (base32
 | 
			
		||||
                   "1a7skwgpl91adhcwlmdr76xzdpidh91hvcmj34zz6548bpx3a87h"))))
 | 
			
		||||
       ("youtube-dl" ,youtube-dl)
 | 
			
		||||
       ("zlib" ,zlib)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:phases
 | 
			
		||||
       (modify-phases %standard-phases
 | 
			
		||||
         (add-before
 | 
			
		||||
          configure setup-waf
 | 
			
		||||
          (lambda* (#:key inputs #:allow-other-keys)
 | 
			
		||||
            (copy-file (assoc-ref inputs "waf") "waf")
 | 
			
		||||
            (setenv "CC" "gcc")))
 | 
			
		||||
         (add-before
 | 
			
		||||
          configure patch-wscript
 | 
			
		||||
          (lambda* (#:key inputs #:allow-other-keys)
 | 
			
		||||
            (substitute* "wscript"
 | 
			
		||||
              ;; XXX Remove this when our Samba package provides a .pc file.
 | 
			
		||||
              (("check_pkg_config\\('smbclient'\\)")
 | 
			
		||||
               "check_cc(lib='smbclient')")
 | 
			
		||||
              ;; XXX Remove this when our Lua package provides a .pc file.
 | 
			
		||||
              (("check_lua")
 | 
			
		||||
               "check_cc(lib='lua')")))))
 | 
			
		||||
       ;; No check function defined.
 | 
			
		||||
       #:tests? #f))
 | 
			
		||||
    (home-page "http://mpv.io/")
 | 
			
		||||
    (synopsis "Audio and video player")
 | 
			
		||||
    (description "mpv is a general-purpose audio and video player.  It is a
 | 
			
		||||
fork of mplayer2 and MPlayer.  It shares some features with the former
 | 
			
		||||
projects while introducing many more.")
 | 
			
		||||
    (license gpl2+)))
 | 
			
		||||
 | 
			
		||||
(define-public libvpx
 | 
			
		||||
  (package
 | 
			
		||||
    (name "libvpx")
 | 
			
		||||
| 
						 | 
				
			
			@ -1065,6 +1190,47 @@ capabilities.")
 | 
			
		|||
            (alist-delete 'install
 | 
			
		||||
               %standard-phases)))))))))
 | 
			
		||||
 | 
			
		||||
(define-public vapoursynth
 | 
			
		||||
  (package
 | 
			
		||||
    (name "vapoursynth")
 | 
			
		||||
    (version "26")
 | 
			
		||||
    (source (origin
 | 
			
		||||
              (method url-fetch)
 | 
			
		||||
              (uri (string-append
 | 
			
		||||
                    "https://github.com/vapoursynth/vapoursynth/archive/R"
 | 
			
		||||
                    version ".tar.gz"))
 | 
			
		||||
              (sha256
 | 
			
		||||
               (base32
 | 
			
		||||
                "1qbg5kg0kgrxldd0ckn1s7vy7vx2ig8nqzv6djp38fxccpzw3x9k"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (native-inputs
 | 
			
		||||
     `(("autoconf" ,autoconf)
 | 
			
		||||
       ("automake" ,automake)
 | 
			
		||||
       ("cython" ,python-cython)
 | 
			
		||||
       ("libtool" ,libtool)
 | 
			
		||||
       ("pkg-config" ,pkg-config)
 | 
			
		||||
       ("python" ,python)
 | 
			
		||||
       ("yasm" ,yasm)))
 | 
			
		||||
    (inputs
 | 
			
		||||
     `(("ffmpeg" ,ffmpeg)
 | 
			
		||||
       ("libass" ,libass)
 | 
			
		||||
       ("tesseract-ocr" ,tesseract-ocr)))
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:phases
 | 
			
		||||
       (modify-phases %standard-phases
 | 
			
		||||
         (add-after
 | 
			
		||||
          unpack autogen
 | 
			
		||||
          (lambda _
 | 
			
		||||
            (zero? (system* "sh" "autogen.sh")))))))
 | 
			
		||||
    (home-page "http://www.vapoursynth.com/")
 | 
			
		||||
    (synopsis "Video processing framework")
 | 
			
		||||
    (description "VapourSynth is a C++ library and Python module for video
 | 
			
		||||
manipulation.  It aims to be a modern rewrite of Avisynth, supporting
 | 
			
		||||
multithreading, generalized colorspaces, per frame properties, and videos with
 | 
			
		||||
format changes.")
 | 
			
		||||
    ;; As seen from the source files.
 | 
			
		||||
    (license lgpl2.1+)))
 | 
			
		||||
 | 
			
		||||
(define-public xvid
 | 
			
		||||
  (package
 | 
			
		||||
    (name "xvid")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr>
 | 
			
		||||
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
 | 
			
		||||
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 | 
			
		||||
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 | 
			
		||||
;;; Copyright © 2014, 2015 Alex Kost <alezost@gmail.com>
 | 
			
		||||
;;; Copyright © 2013, 2015 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
| 
						 | 
				
			
			@ -26,6 +26,7 @@
 | 
			
		|||
  #:use-module ((guix licenses) #:prefix license:)
 | 
			
		||||
  #:use-module (guix packages)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix utils)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
  #:use-module (gnu packages)
 | 
			
		||||
  #:use-module (gnu packages compression)
 | 
			
		||||
| 
						 | 
				
			
			@ -442,6 +443,13 @@ transparent text on your screen.")
 | 
			
		|||
    (inputs
 | 
			
		||||
     `(("libx11" ,libx11)
 | 
			
		||||
       ("guile" ,guile-2.0)))
 | 
			
		||||
    (arguments `(#:configure-flags
 | 
			
		||||
                 '(;; FIXME: xbindkeys-1.8.6's config.guess fails on mips64el.
 | 
			
		||||
                   ,@(if (%current-target-system)
 | 
			
		||||
                         '()
 | 
			
		||||
                         (let ((triplet
 | 
			
		||||
                                (nix-system->gnu-triplet (%current-system))))
 | 
			
		||||
                           (list (string-append "--build=" triplet)))))))
 | 
			
		||||
    (home-page "http://www.nongnu.org/xbindkeys/")
 | 
			
		||||
    (synopsis "Associate a combination of keys with a shell command")
 | 
			
		||||
    (description
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4884,14 +4884,14 @@ user-friendly mechanism to start the X server.")
 | 
			
		|||
(define-public xterm
 | 
			
		||||
  (package
 | 
			
		||||
    (name "xterm")
 | 
			
		||||
    (version "315")
 | 
			
		||||
    (version "317")
 | 
			
		||||
    (source (origin
 | 
			
		||||
              (method url-fetch)
 | 
			
		||||
              (uri (string-append "ftp://ftp.invisible-island.net/xterm/"
 | 
			
		||||
                                  "xterm-" version ".tgz"))
 | 
			
		||||
              (sha256
 | 
			
		||||
               (base32
 | 
			
		||||
                "00kxg36hzp011x98ib6x503pbhj1ldh6hb82l5x3a68s554h1rpy"))))
 | 
			
		||||
                "0v9mirqws1vb8wxbdgn1w166ln7xmapg1913c7kzjs3mwkdv1rfj"))))
 | 
			
		||||
    (build-system gnu-build-system)
 | 
			
		||||
    (arguments
 | 
			
		||||
     '(#:configure-flags '("--enable-wide-chars" "--enable-256-color"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -640,6 +640,7 @@ passed to @command{guix-daemon}."
 | 
			
		|||
 | 
			
		||||
  (with-monad %store-monad
 | 
			
		||||
    (return (service
 | 
			
		||||
             (documentation "Run the Guix daemon.")
 | 
			
		||||
             (provision '(guix-daemon))
 | 
			
		||||
             (requirement '(user-processes))
 | 
			
		||||
             (start
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										68
									
								
								gnu/services/lirc.scm
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								gnu/services/lirc.scm
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,68 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
 | 
			
		||||
;;; under the terms of the GNU General Public License as published by
 | 
			
		||||
;;; the Free Software Foundation; either version 3 of the License, or (at
 | 
			
		||||
;;; your option) any later version.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is distributed in the hope that it will be useful, but
 | 
			
		||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
;;; GNU General Public License for more details.
 | 
			
		||||
;;;
 | 
			
		||||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (gnu services lirc)
 | 
			
		||||
  #:use-module (gnu services)
 | 
			
		||||
  #:use-module (gnu packages lirc)
 | 
			
		||||
  #:use-module (guix monads)
 | 
			
		||||
  #:use-module (guix store)
 | 
			
		||||
  #:use-module (guix gexp)
 | 
			
		||||
  #:export (lirc-service))
 | 
			
		||||
 | 
			
		||||
;;; Commentary:
 | 
			
		||||
;;;
 | 
			
		||||
;;; LIRC services.
 | 
			
		||||
;;;
 | 
			
		||||
;;; Code:
 | 
			
		||||
 | 
			
		||||
(define* (lirc-service #:key (lirc lirc)
 | 
			
		||||
                       device driver config-file
 | 
			
		||||
                       (extra-options '()))
 | 
			
		||||
  "Return a service that runs @url{http://www.lirc.org,LIRC}, a daemon that
 | 
			
		||||
decodes infrared signals from remote controls.
 | 
			
		||||
 | 
			
		||||
The daemon will use specified @var{device}, @var{driver} and
 | 
			
		||||
@var{config-file} (configuration file name).
 | 
			
		||||
 | 
			
		||||
Finally, @var{extra-options} is a list of additional command-line options
 | 
			
		||||
passed to @command{lircd}."
 | 
			
		||||
  (with-monad %store-monad
 | 
			
		||||
    (return
 | 
			
		||||
     (service
 | 
			
		||||
      (provision '(lircd))
 | 
			
		||||
      (documentation "Run the LIRC daemon.")
 | 
			
		||||
      (requirement '(user-processes))
 | 
			
		||||
      (start #~(make-forkexec-constructor
 | 
			
		||||
                (list (string-append #$lirc "/sbin/lircd")
 | 
			
		||||
                      "--nodaemon"
 | 
			
		||||
                      #$@(if device
 | 
			
		||||
                             #~("--device" #$device)
 | 
			
		||||
                             #~())
 | 
			
		||||
                      #$@(if driver
 | 
			
		||||
                             #~("--driver" #$driver)
 | 
			
		||||
                             #~())
 | 
			
		||||
                      #$@(if config-file
 | 
			
		||||
                             #~(#$config-file)
 | 
			
		||||
                             #~())
 | 
			
		||||
                      #$@extra-options)))
 | 
			
		||||
      (stop #~(make-kill-destructor))
 | 
			
		||||
      (activate #~(begin
 | 
			
		||||
                    (use-modules (guix build utils))
 | 
			
		||||
                    (mkdir-p "/var/run/lirc")))))))
 | 
			
		||||
 | 
			
		||||
;;; lirc.scm ends here
 | 
			
		||||
							
								
								
									
										236
									
								
								guix/build/gremlin.scm
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										236
									
								
								guix/build/gremlin.scm
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,236 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
 | 
			
		||||
;;; under the terms of the GNU General Public License as published by
 | 
			
		||||
;;; the Free Software Foundation; either version 3 of the License, or (at
 | 
			
		||||
;;; your option) any later version.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is distributed in the hope that it will be useful, but
 | 
			
		||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
;;; GNU General Public License for more details.
 | 
			
		||||
;;;
 | 
			
		||||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (guix build gremlin)
 | 
			
		||||
  #:use-module (guix elf)
 | 
			
		||||
  #:use-module (ice-9 match)
 | 
			
		||||
  #:use-module (srfi srfi-1)
 | 
			
		||||
  #:use-module (srfi srfi-9)
 | 
			
		||||
  #:use-module (srfi srfi-26)
 | 
			
		||||
  #:use-module (system foreign)
 | 
			
		||||
  #:use-module (rnrs bytevectors)
 | 
			
		||||
  #:use-module (rnrs io ports)
 | 
			
		||||
  #:export (elf-dynamic-info
 | 
			
		||||
            elf-dynamic-info?
 | 
			
		||||
            elf-dynamic-info-sopath
 | 
			
		||||
            elf-dynamic-info-needed
 | 
			
		||||
            elf-dynamic-info-rpath
 | 
			
		||||
            elf-dynamic-info-runpath
 | 
			
		||||
 | 
			
		||||
            validate-needed-in-runpath))
 | 
			
		||||
 | 
			
		||||
;;; Commentary:
 | 
			
		||||
;;;
 | 
			
		||||
;;; A gremlin is sort-of like an elf, you know, and this module provides tools
 | 
			
		||||
;;; to deal with dynamic-link information from ELF files.
 | 
			
		||||
;;;
 | 
			
		||||
;;; Code:
 | 
			
		||||
 | 
			
		||||
(define (dynamic-link-segment elf)
 | 
			
		||||
  "Return the 'PT_DYNAMIC' segment of ELF--i.e., the segment that contains
 | 
			
		||||
dynamic linking information."
 | 
			
		||||
  (find (lambda (segment)
 | 
			
		||||
          (= (elf-segment-type segment) PT_DYNAMIC))
 | 
			
		||||
        (elf-segments elf)))
 | 
			
		||||
 | 
			
		||||
(define (word-reader size byte-order)
 | 
			
		||||
  "Return a procedure to read a word of SIZE bytes according to BYTE-ORDER."
 | 
			
		||||
  (case size
 | 
			
		||||
    ((8)
 | 
			
		||||
     (lambda (bv index)
 | 
			
		||||
       (bytevector-u64-ref bv index byte-order)))
 | 
			
		||||
    ((4)
 | 
			
		||||
     (lambda (bv index)
 | 
			
		||||
       (bytevector-u32-ref bv index byte-order)))))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;; Dynamic entry:
 | 
			
		||||
;;
 | 
			
		||||
;; typedef struct
 | 
			
		||||
;; {
 | 
			
		||||
;;   Elf64_Sxword       d_tag;   /* Dynamic entry type */
 | 
			
		||||
;;   union
 | 
			
		||||
;;     {
 | 
			
		||||
;;       Elf64_Xword d_val;      /* Integer value */
 | 
			
		||||
;;       Elf64_Addr d_ptr;       /* Address value */
 | 
			
		||||
;;     } d_un;
 | 
			
		||||
;; } Elf64_Dyn;
 | 
			
		||||
 | 
			
		||||
(define (raw-dynamic-entries elf segment)
 | 
			
		||||
  "Return as a list of type/value pairs all the dynamic entries found in
 | 
			
		||||
SEGMENT, the 'PT_DYNAMIC' segment of ELF.  In the result, each car is a DT_
 | 
			
		||||
value, and the interpretation of the cdr depends on the type."
 | 
			
		||||
  (define start
 | 
			
		||||
    (elf-segment-offset segment))
 | 
			
		||||
  (define bytes
 | 
			
		||||
    (elf-bytes elf))
 | 
			
		||||
  (define word-size
 | 
			
		||||
    (elf-word-size elf))
 | 
			
		||||
  (define byte-order
 | 
			
		||||
    (elf-byte-order elf))
 | 
			
		||||
  (define read-word
 | 
			
		||||
    (word-reader word-size byte-order))
 | 
			
		||||
 | 
			
		||||
  (let loop ((offset 0)
 | 
			
		||||
             (result '()))
 | 
			
		||||
    (if (>= offset (elf-segment-memsz segment))
 | 
			
		||||
        (reverse result)
 | 
			
		||||
        (let ((type  (read-word bytes (+ start offset)))
 | 
			
		||||
              (value (read-word bytes (+ start offset word-size))))
 | 
			
		||||
          (if (= type DT_NULL)                    ;finished?
 | 
			
		||||
              (reverse result)
 | 
			
		||||
              (loop (+ offset (* 2 word-size))
 | 
			
		||||
                    (alist-cons type value result)))))))
 | 
			
		||||
 | 
			
		||||
(define (vma->offset elf vma)
 | 
			
		||||
  "Convert VMA, a virtual memory address, to an offset within ELF.
 | 
			
		||||
 | 
			
		||||
Do that by looking at the loadable program segment (PT_LOAD) of ELF that
 | 
			
		||||
contains VMA and by taking into account that segment's virtual address and
 | 
			
		||||
offset."
 | 
			
		||||
  ;; See 'offset_from_vma' in Binutils.
 | 
			
		||||
  (define loads
 | 
			
		||||
    (filter (lambda (segment)
 | 
			
		||||
              (= (elf-segment-type segment) PT_LOAD))
 | 
			
		||||
            (elf-segments elf)))
 | 
			
		||||
 | 
			
		||||
  (let ((load (find (lambda (segment)
 | 
			
		||||
                      (let ((vaddr (elf-segment-vaddr segment)))
 | 
			
		||||
                        (and (>= vma vaddr)
 | 
			
		||||
                             (< vma (+ (elf-segment-memsz segment)
 | 
			
		||||
                                       vaddr)))))
 | 
			
		||||
                    loads)))
 | 
			
		||||
    (+ (- vma (elf-segment-vaddr load))
 | 
			
		||||
       (elf-segment-offset load))))
 | 
			
		||||
 | 
			
		||||
(define (dynamic-entries elf segment)
 | 
			
		||||
  "Return all the dynamic entries found in SEGMENT, the 'PT_DYNAMIC' segment
 | 
			
		||||
of ELF, as a list of type/value pairs.  The type is a DT_ value, and the value
 | 
			
		||||
may be a string or an integer depending on the entry type (for instance, the
 | 
			
		||||
value of DT_NEEDED entries is a string.)"
 | 
			
		||||
  (define entries
 | 
			
		||||
    (raw-dynamic-entries elf segment))
 | 
			
		||||
 | 
			
		||||
  (define string-table-offset
 | 
			
		||||
    (any (match-lambda
 | 
			
		||||
            ((type . value)
 | 
			
		||||
             (and (= type DT_STRTAB) value))
 | 
			
		||||
            (_ #f))
 | 
			
		||||
         entries))
 | 
			
		||||
 | 
			
		||||
  (define (interpret-dynamic-entry type value)
 | 
			
		||||
    (cond ((memv type (list DT_NEEDED DT_SONAME DT_RPATH DT_RUNPATH))
 | 
			
		||||
           (if string-table-offset
 | 
			
		||||
               (pointer->string
 | 
			
		||||
                (bytevector->pointer (elf-bytes elf)
 | 
			
		||||
                                     (vma->offset
 | 
			
		||||
                                      elf
 | 
			
		||||
                                      (+ string-table-offset value))))
 | 
			
		||||
               value))
 | 
			
		||||
          (else
 | 
			
		||||
           value)))
 | 
			
		||||
 | 
			
		||||
  (map (match-lambda
 | 
			
		||||
         ((type . value)
 | 
			
		||||
          (cons type (interpret-dynamic-entry type value))))
 | 
			
		||||
       entries))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;;;
 | 
			
		||||
;;; High-level interface.
 | 
			
		||||
;;;
 | 
			
		||||
 | 
			
		||||
(define-record-type <elf-dynamic-info>
 | 
			
		||||
  (%elf-dynamic-info soname needed rpath runpath)
 | 
			
		||||
  elf-dynamic-info?
 | 
			
		||||
  (soname    elf-dynamic-info-soname)
 | 
			
		||||
  (needed    elf-dynamic-info-needed)
 | 
			
		||||
  (rpath     elf-dynamic-info-rpath)
 | 
			
		||||
  (runpath   elf-dynamic-info-runpath))
 | 
			
		||||
 | 
			
		||||
(define search-path->list
 | 
			
		||||
  (let ((not-colon (char-set-complement (char-set #\:))))
 | 
			
		||||
    (lambda (str)
 | 
			
		||||
      "Split STR on ':' characters."
 | 
			
		||||
      (string-tokenize str not-colon))))
 | 
			
		||||
 | 
			
		||||
(define (elf-dynamic-info elf)
 | 
			
		||||
  "Return dynamic-link information for ELF as an <elf-dynamic-info> object, or
 | 
			
		||||
#f if ELF lacks dynamic-link information."
 | 
			
		||||
  (match (dynamic-link-segment elf)
 | 
			
		||||
    (#f #f)
 | 
			
		||||
    ((? elf-segment? dynamic)
 | 
			
		||||
     (let ((entries (dynamic-entries elf dynamic)))
 | 
			
		||||
       (%elf-dynamic-info (assv-ref entries DT_SONAME)
 | 
			
		||||
                          (filter-map (match-lambda
 | 
			
		||||
                                        ((type . value)
 | 
			
		||||
                                         (and (= type DT_NEEDED) value))
 | 
			
		||||
                                        (_ #f))
 | 
			
		||||
                                      entries)
 | 
			
		||||
                          (or (and=> (assv-ref entries DT_RPATH)
 | 
			
		||||
                                     search-path->list)
 | 
			
		||||
                              '())
 | 
			
		||||
                          (or (and=> (assv-ref entries DT_RUNPATH)
 | 
			
		||||
                                     search-path->list)
 | 
			
		||||
                              '()))))))
 | 
			
		||||
 | 
			
		||||
(define %libc-libraries
 | 
			
		||||
  ;; List of libraries as of glibc 2.21 (there are more but those are
 | 
			
		||||
  ;; typically mean to be LD_PRELOADed and thus do not appear as NEEDED.)
 | 
			
		||||
  '("libanl.so"
 | 
			
		||||
    "libcrypt.so"
 | 
			
		||||
    "libc.so"
 | 
			
		||||
    "libdl.so"
 | 
			
		||||
    "libm.so"
 | 
			
		||||
    "libpthread.so"
 | 
			
		||||
    "libresolv.so"
 | 
			
		||||
    "librt.so"
 | 
			
		||||
    "libutil.so"))
 | 
			
		||||
 | 
			
		||||
(define (libc-library? lib)
 | 
			
		||||
  "Return #t if LIB is one of the libraries shipped with the GNU C Library."
 | 
			
		||||
  (find (lambda (libc-lib)
 | 
			
		||||
          (string-prefix? libc-lib lib))
 | 
			
		||||
        %libc-libraries))
 | 
			
		||||
 | 
			
		||||
(define* (validate-needed-in-runpath file
 | 
			
		||||
                                     #:key (always-found? libc-library?))
 | 
			
		||||
  "Return #t if all the libraries listed as FILE's 'DT_NEEDED' entries are
 | 
			
		||||
present in its RUNPATH, or if FILE lacks dynamic-link information.  Return #f
 | 
			
		||||
otherwise.  Libraries whose name matches ALWAYS-FOUND? are considered to be
 | 
			
		||||
always available."
 | 
			
		||||
  (let* ((elf     (call-with-input-file file
 | 
			
		||||
                    (compose parse-elf get-bytevector-all)))
 | 
			
		||||
         (dyninfo (elf-dynamic-info elf)))
 | 
			
		||||
    (when dyninfo
 | 
			
		||||
      (let* ((runpath   (elf-dynamic-info-runpath dyninfo))
 | 
			
		||||
             (needed    (remove always-found?
 | 
			
		||||
                                (elf-dynamic-info-needed dyninfo)))
 | 
			
		||||
             (not-found (remove (cut search-path runpath <>)
 | 
			
		||||
                                needed)))
 | 
			
		||||
        (for-each (lambda (lib)
 | 
			
		||||
                    (format (current-error-port)
 | 
			
		||||
                            "error: '~a' depends on '~a', which cannot \
 | 
			
		||||
be found in RUNPATH ~s~%"
 | 
			
		||||
                            file lib runpath))
 | 
			
		||||
                  not-found)
 | 
			
		||||
        ;; (when (null? not-found)
 | 
			
		||||
        ;;   (format (current-error-port) "~a is OK~%" file))
 | 
			
		||||
        (null? not-found)))))
 | 
			
		||||
 | 
			
		||||
;;; gremlin.scm ends here
 | 
			
		||||
| 
						 | 
				
			
			@ -1,6 +1,6 @@
 | 
			
		|||
;;; Guile ELF reader and writer
 | 
			
		||||
 | 
			
		||||
;; Copyright (C)  2011, 2012, 2013, 2014 Free Software Foundation, Inc.
 | 
			
		||||
;; Copyright (C)  2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.
 | 
			
		||||
 | 
			
		||||
;;;; This library is free software; you can redistribute it and/or
 | 
			
		||||
;;;; modify it under the terms of the GNU Lesser General Public
 | 
			
		||||
| 
						 | 
				
			
			@ -571,6 +571,7 @@
 | 
			
		|||
     ((4) parse-elf32-program-header)
 | 
			
		||||
     ((8) parse-elf64-program-header)
 | 
			
		||||
     (else (error "unhandled pointer size")))
 | 
			
		||||
   n
 | 
			
		||||
   (elf-bytes elf)
 | 
			
		||||
   (+ (elf-phoff elf) (* n (elf-phentsize elf)))
 | 
			
		||||
   (elf-byte-order elf)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,6 +31,8 @@
 | 
			
		|||
 | 
			
		||||
            gexp-input
 | 
			
		||||
            gexp-input?
 | 
			
		||||
            local-file
 | 
			
		||||
            local-file?
 | 
			
		||||
 | 
			
		||||
            gexp->derivation
 | 
			
		||||
            gexp->file
 | 
			
		||||
| 
						 | 
				
			
			@ -133,6 +135,37 @@ cross-compiling.)"
 | 
			
		|||
  (with-monad %store-monad
 | 
			
		||||
    (return drv)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;;;
 | 
			
		||||
;;; Local files.
 | 
			
		||||
;;;
 | 
			
		||||
 | 
			
		||||
(define-record-type <local-file>
 | 
			
		||||
  (%local-file file name recursive?)
 | 
			
		||||
  local-file?
 | 
			
		||||
  (file       local-file-file)                    ;string
 | 
			
		||||
  (name       local-file-name)                    ;string
 | 
			
		||||
  (recursive? local-file-recursive?))             ;Boolean
 | 
			
		||||
 | 
			
		||||
(define* (local-file file #:optional (name (basename file))
 | 
			
		||||
                     #:key (recursive? #t))
 | 
			
		||||
  "Return an object representing local file FILE to add to the store; this
 | 
			
		||||
object can be used in a gexp.  FILE will be added to the store under NAME--by
 | 
			
		||||
default the base name of FILE.
 | 
			
		||||
 | 
			
		||||
When RECURSIVE? is true, the contents of FILE are added recursively; if FILE
 | 
			
		||||
designates a flat file and RECURSIVE? is true, its contents are added, and its
 | 
			
		||||
permission bits are kept.
 | 
			
		||||
 | 
			
		||||
This is the declarative counterpart of the 'interned-file' monadic procedure."
 | 
			
		||||
  (%local-file file name recursive?))
 | 
			
		||||
 | 
			
		||||
(define-gexp-compiler (local-file-compiler (file local-file?) system target)
 | 
			
		||||
  ;; "Compile" FILE by adding it to the store.
 | 
			
		||||
  (match file
 | 
			
		||||
    (($ <local-file> file name recursive?)
 | 
			
		||||
     (interned-file file name #:recursive? recursive?))))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;;;
 | 
			
		||||
;;; Inputs & outputs.
 | 
			
		||||
| 
						 | 
				
			
			@ -171,7 +204,7 @@ the cross-compilation target triplet."
 | 
			
		|||
  (with-monad %store-monad
 | 
			
		||||
    (sequence %store-monad
 | 
			
		||||
              (map (match-lambda
 | 
			
		||||
                    ((and ((? struct? thing) sub-drv ...) input)
 | 
			
		||||
                     (((? struct? thing) sub-drv ...)
 | 
			
		||||
                      (mlet* %store-monad ((lower -> (lookup-compiler thing))
 | 
			
		||||
                                           (drv (lower thing system target)))
 | 
			
		||||
                        (return `(,drv ,@sub-drv))))
 | 
			
		||||
| 
						 | 
				
			
			@ -453,8 +486,13 @@ and in the current monad setting (system type, etc.)"
 | 
			
		|||
        (($ <gexp-input> (? struct? thing) output n?)
 | 
			
		||||
         (let ((lower  (lookup-compiler thing))
 | 
			
		||||
               (target (if (or n? native?) #f target)))
 | 
			
		||||
           (mlet %store-monad ((drv (lower thing system target)))
 | 
			
		||||
             (return (derivation->output-path drv output)))))
 | 
			
		||||
           (mlet %store-monad ((obj (lower thing system target)))
 | 
			
		||||
             ;; OBJ must be either a derivation or a store file name.
 | 
			
		||||
             (return (match obj
 | 
			
		||||
                       ((? derivation? drv)
 | 
			
		||||
                        (derivation->output-path drv output))
 | 
			
		||||
                       ((? string? file)
 | 
			
		||||
                        file))))))
 | 
			
		||||
        (($ <gexp-input> x)
 | 
			
		||||
         (return x))
 | 
			
		||||
        (x
 | 
			
		||||
| 
						 | 
				
			
			@ -809,8 +847,9 @@ its search path."
 | 
			
		|||
 | 
			
		||||
(define* (text-file* name #:rest text)
 | 
			
		||||
  "Return as a monadic value a derivation that builds a text file containing
 | 
			
		||||
all of TEXT.  TEXT may list, in addition to strings, packages, derivations,
 | 
			
		||||
and store file names; the resulting store file holds references to all these."
 | 
			
		||||
all of TEXT.  TEXT may list, in addition to strings, objects of any type that
 | 
			
		||||
can be used in a gexp: packages, derivations, local file objects, etc.  The
 | 
			
		||||
resulting store file holds references to all these."
 | 
			
		||||
  (define builder
 | 
			
		||||
    (gexp (call-with-output-file (ungexp output "out")
 | 
			
		||||
            (lambda (port)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -310,7 +310,7 @@ main (int argc, char *argv[])
 | 
			
		|||
	  if (subs == "default")
 | 
			
		||||
	    {
 | 
			
		||||
	      string subst =
 | 
			
		||||
		settings.nixLibexecDir + "/guix/substitute-binary";
 | 
			
		||||
		settings.nixLibexecDir + "/guix/substitute";
 | 
			
		||||
	      setenv ("NIX_SUBSTITUTERS", subst.c_str (), 1);
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,7 +9,7 @@ guix/scripts/package.scm
 | 
			
		|||
guix/scripts/gc.scm
 | 
			
		||||
guix/scripts/hash.scm
 | 
			
		||||
guix/scripts/pull.scm
 | 
			
		||||
guix/scripts/substitute-binary.scm
 | 
			
		||||
guix/scripts/substitute.scm
 | 
			
		||||
guix/scripts/authenticate.scm
 | 
			
		||||
guix/scripts/system.scm
 | 
			
		||||
guix/scripts/lint.scm
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -97,6 +97,18 @@
 | 
			
		|||
                              %store (package-source coreutils))))
 | 
			
		||||
                 (gexp->sexp* exp)))))
 | 
			
		||||
 | 
			
		||||
(test-assert "one local file"
 | 
			
		||||
  (let* ((file  (search-path %load-path "guix.scm"))
 | 
			
		||||
         (local (local-file file))
 | 
			
		||||
         (exp   (gexp (display (ungexp local))))
 | 
			
		||||
         (intd  (add-to-store %store (basename file) #t
 | 
			
		||||
                              "sha256" file)))
 | 
			
		||||
    (and (gexp? exp)
 | 
			
		||||
         (match (gexp-inputs exp)
 | 
			
		||||
           (((x "out"))
 | 
			
		||||
            (eq? x local)))
 | 
			
		||||
         (equal? `(display ,intd) (gexp->sexp* exp)))))
 | 
			
		||||
 | 
			
		||||
(test-assert "same input twice"
 | 
			
		||||
  (let ((exp (gexp (begin
 | 
			
		||||
                     (display (ungexp coreutils))
 | 
			
		||||
| 
						 | 
				
			
			@ -336,6 +348,20 @@
 | 
			
		|||
    (mlet %store-monad ((drv mdrv))
 | 
			
		||||
      (return (string=? system (derivation-system drv))))))
 | 
			
		||||
 | 
			
		||||
(test-assertm "gexp->derivation, local-file"
 | 
			
		||||
  (mlet* %store-monad ((file ->  (search-path %load-path "guix.scm"))
 | 
			
		||||
                       (intd     (interned-file file))
 | 
			
		||||
                       (local -> (local-file file))
 | 
			
		||||
                       (exp ->   (gexp (begin
 | 
			
		||||
                                         (stat (ungexp local))
 | 
			
		||||
                                         (symlink (ungexp local)
 | 
			
		||||
                                                  (ungexp output)))))
 | 
			
		||||
                       (drv      (gexp->derivation "local-file" exp)))
 | 
			
		||||
    (mbegin %store-monad
 | 
			
		||||
      (built-derivations (list drv))
 | 
			
		||||
      (return (string=? (readlink (derivation->output-path drv))
 | 
			
		||||
                        intd)))))
 | 
			
		||||
 | 
			
		||||
(test-assertm "gexp->derivation, cross-compilation"
 | 
			
		||||
  (mlet* %store-monad ((target -> "mips64el-linux")
 | 
			
		||||
                       (exp    -> (gexp (list (ungexp coreutils)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										57
									
								
								tests/gremlin.scm
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								tests/gremlin.scm
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,57 @@
 | 
			
		|||
;;; GNU Guix --- Functional package management for GNU
 | 
			
		||||
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
 | 
			
		||||
;;;
 | 
			
		||||
;;; This file is part of GNU Guix.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is free software; you can redistribute it and/or modify it
 | 
			
		||||
;;; under the terms of the GNU General Public License as published by
 | 
			
		||||
;;; the Free Software Foundation; either version 3 of the License, or (at
 | 
			
		||||
;;; your option) any later version.
 | 
			
		||||
;;;
 | 
			
		||||
;;; GNU Guix is distributed in the hope that it will be useful, but
 | 
			
		||||
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
;;; GNU General Public License for more details.
 | 
			
		||||
;;;
 | 
			
		||||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
(define-module (test-gremlin)
 | 
			
		||||
  #:use-module (guix elf)
 | 
			
		||||
  #:use-module (guix build utils)
 | 
			
		||||
  #:use-module (guix build gremlin)
 | 
			
		||||
  #:use-module (srfi srfi-1)
 | 
			
		||||
  #:use-module (srfi srfi-64)
 | 
			
		||||
  #:use-module (rnrs io ports)
 | 
			
		||||
  #:use-module (ice-9 match))
 | 
			
		||||
 | 
			
		||||
(define %guile-executable
 | 
			
		||||
  (match (command-line)
 | 
			
		||||
    ((program . _)
 | 
			
		||||
     (and (file-exists? program) (elf-file? program)
 | 
			
		||||
          program))
 | 
			
		||||
    (_
 | 
			
		||||
     #f)))
 | 
			
		||||
 | 
			
		||||
(define read-elf
 | 
			
		||||
  (compose parse-elf get-bytevector-all))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(test-begin "gremlin")
 | 
			
		||||
 | 
			
		||||
(unless %guile-executable (test-skip 1))
 | 
			
		||||
(test-assert "elf-dynamic-info-needed, executable"
 | 
			
		||||
  (let* ((elf     (call-with-input-file %guile-executable read-elf))
 | 
			
		||||
         (dyninfo (elf-dynamic-info elf)))
 | 
			
		||||
    (or (not dyninfo)                             ;static executable
 | 
			
		||||
        (lset<= string=?
 | 
			
		||||
                (list (string-append "libguile-" (effective-version))
 | 
			
		||||
                      "libgc" "libunistring" "libffi")
 | 
			
		||||
                (map (lambda (lib)
 | 
			
		||||
                       (string-take lib (string-contains lib ".so")))
 | 
			
		||||
                     (elf-dynamic-info-needed dyninfo))))))
 | 
			
		||||
 | 
			
		||||
(test-end "gremlin")
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(exit (= (test-runner-fail-count (test-runner-current)) 0))
 | 
			
		||||
| 
						 | 
				
			
			@ -17,7 +17,7 @@
 | 
			
		|||
# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Test the daemon and its interaction with 'guix substitute-binary'.
 | 
			
		||||
# Test the daemon and its interaction with 'guix substitute'.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
| 
						 | 
				
			
			@ -51,7 +51,7 @@ Deriver: $drv
 | 
			
		|||
EOF
 | 
			
		||||
 | 
			
		||||
# Remove the cached narinfo.
 | 
			
		||||
rm -f "$XDG_CACHE_HOME/guix/substitute-binary/$hash_part"
 | 
			
		||||
rm -f "$XDG_CACHE_HOME/guix/substitute/$hash_part"
 | 
			
		||||
 | 
			
		||||
# Make sure we see the substitute.
 | 
			
		||||
guile -c '
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,7 +17,7 @@
 | 
			
		|||
# along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Test the daemon and its interaction with 'guix substitute-binary'.
 | 
			
		||||
# Test the daemon and its interaction with 'guix substitute'.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,8 +18,7 @@
 | 
			
		|||
;;; You should have received a copy of the GNU General Public License
 | 
			
		||||
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
(define-module (test-packages)
 | 
			
		||||
(define-module (test-lint)
 | 
			
		||||
  #:use-module (guix tests)
 | 
			
		||||
  #:use-module (guix download)
 | 
			
		||||
  #:use-module (guix build-system gnu)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue