all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH]: gnu: Add bedops.
@ 2015-02-11 16:02 Ricardo Wurmus
  2015-02-13 13:40 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2015-02-11 16:02 UTC (permalink / raw)
  To: Guix-devel

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

Hi Guix,

attached is a patch for BEDOPS.

The build process for this application is a bit messy because the
sources include tarballs of modified upstream libraries (jansson, bzip2,
zlib), so we cannot just swap them out for system libraries.

I'm in touch with the developers to see if we can get a build option to
link against system libraries instead of the bundled copies.  To achieve
this, though, the patches have to be extracted first (already submitted
a patch upstream), and any feature that has been added by patching
upstream library sources would have to be implemented a different way.
Until then we can't do anything but go along with building these patched
library copies even though it isn't pretty.

~~ Ricardo


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

From 270b5a501c251e80a040342d4d39d4e236b90c97 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 11 Feb 2015 16:55:33 +0100
Subject: [PATCH] gnu: Add bedops.

* gnu/packages/bioinformatics.scm (bedops): New variable.
---
 gnu/packages/bioinformatics.scm | 55 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1766855..48bb9dd 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -34,6 +34,61 @@
   #:use-module (gnu packages vim)
   #:use-module (gnu packages zip))
 
+(define-public bedops
+  (package
+    (name "bedops")
+    (version "2.4.5")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/bedops/bedops/archive/v"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0wmg6j0icimlrnsidaxrzf3hfgjvlkkcwvpdg7n4gg7hdv2m9ni5"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:make-flags (list (string-append "BINDIR=" %output "/bin"))
+       #:phases
+       (alist-cons-after
+         'unpack 'unpack-tarballs
+         (lambda _
+           ;; XXX Bedops includes tarballs of minimally patched upstream
+           ;; libraries jansson, zlib, and bzip2.  We cannot just use stock
+           ;; libraries because at least one of the libraries (zlib) is
+           ;; patched to add a C++ function definition (deflateInit2cpp).
+           ;; Until the Bedops developers offer a way to link against system
+           ;; libraries we have to build the in-tree copies of these three
+           ;; libraries.
+
+           ;; Unpack the tarballs to benefit from shebang patching.
+           (with-directory-excursion "third-party"
+             (and (zero? (system* "tar" "xvf" "jansson-2.6.tar.bz2"))
+                  (zero? (system* "tar" "xvf" "zlib-1.2.7.tar.bz2"))
+                  (zero? (system* "tar" "xvf" "bzip2-1.0.6.tar.bz2"))))
+           ;; Disable unpacking of tarballs in Makefile.
+           (substitute* "system.mk/Makefile.linux"
+             (("^\tbzcat .*") "\t@echo \"not unpacking\"\n")
+             (("\\./configure") "CONFIG_SHELL=bash ./configure"))
+           (substitute* "third-party/zlib-1.2.7/Makefile.in"
+             (("^SHELL=.*$") "SHELL=bash\n")))
+         (alist-delete
+          'configure
+          (alist-delete 'check %standard-phases)))))
+    (home-page "https://github.com/bedops/bedops")
+    (synopsis "Tools for high-performance genomic feature operations")
+    (description
+     "BEDOPS is a suite of tools to address common questions raised in genomic
+studies---mostly with regard to overlap and proximity relationships between
+data sets.  It aims to be scalable and flexible, facilitating the efficient
+and accurate analysis and management of large-scale genomic data.
+
+BEDOPS provides tools that perform highly efficient and scalable Boolean and
+other set operations, statistical calculations, archiving, conversion and
+other management of genomic data of arbitrary scale.  Tasks can be easily
+split by chromosome for distributing whole-genome analyses across a
+computational cluster.")
+    (license license:gpl2+)))
+
 (define-public bedtools
   (package
     (name "bedtools")
-- 
2.1.0


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

* Re: [PATCH]: gnu: Add bedops.
  2015-02-11 16:02 [PATCH]: gnu: Add bedops Ricardo Wurmus
@ 2015-02-13 13:40 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-02-13 13:40 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: Guix-devel

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> The build process for this application is a bit messy because the
> sources include tarballs of modified upstream libraries (jansson, bzip2,
> zlib), so we cannot just swap them out for system libraries.
>
> I'm in touch with the developers to see if we can get a build option to
> link against system libraries instead of the bundled copies.  To achieve
> this, though, the patches have to be extracted first (already submitted
> a patch upstream), and any feature that has been added by patching
> upstream library sources would have to be implemented a different way.
> Until then we can't do anything but go along with building these patched
> library copies even though it isn't pretty.

Uh, OK.  I hope that’ll be resolved quickly because it’s really
unpleasant, notably for security reasons.

> From 270b5a501c251e80a040342d4d39d4e236b90c97 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Wed, 11 Feb 2015 16:55:33 +0100
> Subject: [PATCH] gnu: Add bedops.
>
> * gnu/packages/bioinformatics.scm (bedops): New variable.

[...]

> +         'unpack 'unpack-tarballs
> +         (lambda _
> +           ;; XXX Bedops includes tarballs of minimally patched upstream
> +           ;; libraries jansson, zlib, and bzip2.  We cannot just use stock
> +           ;; libraries because at least one of the libraries (zlib) is
> +           ;; patched to add a C++ function definition (deflateInit2cpp).
> +           ;; Until the Bedops developers offer a way to link against system
> +           ;; libraries we have to build the in-tree copies of these three
> +           ;; libraries.

Could you s/XXX/FIXME/ and add a link to the upstream discussion, if
possible?

> +          (alist-delete 'check %standard-phases)))))

Could you use #:tests? #f instead?  I find it clearer.

OK with these changes!

Thanks,
Ludo’.

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

end of thread, other threads:[~2015-02-13 13:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-11 16:02 [PATCH]: gnu: Add bedops Ricardo Wurmus
2015-02-13 13:40 ` Ludovic Courtès

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.