aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner2020-07-05 04:10:28 -0500
committerEfraim Flashner2020-07-05 04:16:23 -0500
commit0e1fe2432e10788a638bc201bdca2d356e1ad4a0 (patch)
tree4bbbe80e1b4b1932b83adbcaf3318ac5926f9b5f
parent63646e03a140f2ffd3004d17d32900f9185416a3 (diff)
downloadguix-bioinformatics-0e1fe2432e10788a638bc201bdca2d356e1ad4a0.tar.gz
gn: Use the guix-past channel.
Adjust for python-2.4 being in the guix-past channel.
-rw-r--r--.guix-channel6
-rw-r--r--README.org7
-rw-r--r--gn/packages/genenetwork.scm1
-rw-r--r--gn/packages/python24.scm97
-rw-r--r--gn/packages/web.scm2
-rw-r--r--gn/services/genenetwork.scm1
6 files changed, 15 insertions, 99 deletions
diff --git a/.guix-channel b/.guix-channel
new file mode 100644
index 0000000..f19d607
--- /dev/null
+++ b/.guix-channel
@@ -0,0 +1,6 @@
+(channel
+ (version 0)
+ (dependencies
+ (channel
+ (name guix-past)
+ (url "https://gitlab.inria.fr/guix-hpc/guix-past"))))
diff --git a/README.org b/README.org
index 5f49a2d..6f986c0 100644
--- a/README.org
+++ b/README.org
@@ -19,7 +19,7 @@ To easily use the packages from this repo, simply add it to your
(cons*
(channel
(name 'gn-bioinformatics)
- (url "https://git.genenetwork.org/pjotrp/guix-bioinformatics.git")
+ (url "https://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics.git")
(branch "master"))
%default-channels)
#+END_SRC
@@ -33,8 +33,9 @@ the GUIX_PACKAGE_PATH to point to the root of this directory
before running Guix. E.g.
#+BEGIN_SRC bash
- git clone https://git.genenetwork.org/pjotrp/guix-bioinformatics.git
- export GUIX_PACKAGE_PATH=$PWD/guix-bioinformatics/
+ git clone https://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics.git
+ git clone https://gitlab.inria.fr/guix-hpc/guix-past.git
+ export GUIX_PACKAGE_PATH=$PWD/guix-bioinformatics/:$PWD/guix-past/modules
guix package -A cwl
#+END_SRC
diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm
index 318cb47..e3e478b 100644
--- a/gn/packages/genenetwork.scm
+++ b/gn/packages/genenetwork.scm
@@ -31,6 +31,7 @@
#:use-module (gnu packages web)
#:use-module (gnu packages wget)
#:use-module (gnu packages xml)
+ #:use-module (past packages python)
#:use-module (gn packages bioinformatics)
#:use-module (gn packages twint)
#:use-module (gn packages crates-io)
diff --git a/gn/packages/python24.scm b/gn/packages/python24.scm
index b24190d..60807b5 100644
--- a/gn/packages/python24.scm
+++ b/gn/packages/python24.scm
@@ -3,111 +3,18 @@
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix download)
- #:use-module (guix git-download)
#:use-module (guix build-system python)
#:use-module (gn packages python)
+ #:use-module (past packages python)
#:use-module (gnu packages compression)
- #:use-module (gnu packages fontutils)
- #:use-module (gnu packages ghostscript)
- #:use-module (gnu packages image)
#:use-module (gnu packages maths)
- #:use-module (gnu packages onc-rpc)
- #:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
- #:use-module (gnu packages readline)
- #:use-module (gnu packages tcl)
- #:use-module (gnu packages tls)
#:use-module (srfi srfi-1))
-;; TODO: Check against 'guix lint -c cve python2.4' list:
-;; CVE-2019-9740, CVE-2019-9947, CVE-2019-9948, CVE-2018-1060, CVE-2018-1061,
-;; CVE-2014-9365, CVE-2012-0845, CVE-2012-1150, CVE-2011-1521, CVE-2011-4940,
-;; CVE-2010-3492, CVE-2008-5031, CVE-2008-5983
-(define-public python-2.4
- (package
- (inherit python-2)
- (name "python2.4")
- (version "2.4.6")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://www.python.org/ftp/python/"
- version "/Python-" version ".tar.bz2"))
- (sha256
- (base32
- "021y88a4ki07dgq19yhg6zfvmncfiz7h5b2255438i9zmlwl246s"))))
- (outputs '("out"))
- (arguments
- (substitute-keyword-arguments (package-arguments python-2)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'create-setup-local
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((zlib (assoc-ref inputs "zlib"))
- (tcl (assoc-ref inputs "tcl"))
- (tk (assoc-ref inputs "tk"))
- (gdbm (assoc-ref inputs "gdbm"))
- (read (assoc-ref inputs "readline"))
- (rpc (assoc-ref inputs "libtirpc"))
- (nsl (assoc-ref inputs "libnsl"))
- (ssl (assoc-ref inputs "openssl")))
- (with-output-to-file "Modules/Setup.local"
- (lambda _
- (format #t "readline readline.c -I~a/include -L~a/lib -lreadline~@
- _ssl _ssl.c -DUSE_SSL -I$~a/include/openssl -L~a/lib -lssl -lcrypto~@
- _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT -L~a/lib -I~a/include -L~a/lib -I~a/include -ltk~a -ltcl~a~@
- gdbm gdbmmodule.c -I~a/include -L~a/lib -lgdbm~@
- nis nismodule.c -I~a/include/tirpc -I~a/include -ltirpc -lnsl~@
- zlib zlibmodule.c -I~a/include -L~a/lib -lz~%"
-read read ssl ssl tcl tcl tk tk ,(version-major+minor (package-version tcl)) ,(version-major+minor (package-version tcl)) gdbm gdbm rpc nsl zlib zlib))))
- #t))
- (add-after 'unpack 'patch-rpc-location
- (lambda _
- (substitute* "Modules/nismodule.c"
- (("<rpc/") "<tirpc/rpc/"))
- (substitute* "setup.py"
- (("\\['nsl'") "['nsl', 'tirpc'"))
- #t))
- (add-after 'unpack 'skip-crypt-module
- (lambda _
- (substitute* "setup.py"
- ((".*cryptmodule.c.*") "\n"))
- #t))
- (add-before 'check 'delete-failing-tests
- (lambda _
- (for-each
- (lambda (file)
- (delete-file (string-append "Lib/test/" file)))
- '("test_anydbm.py" "test_array.py" "test_decimal.py"
- "test_getargs2.py" "test_long.py" "test_math.py"
- "test_mhlib.py" "test_random.py" "test_socket.py"
- "test_str.py" "test_userstring.py" "test_whichdb.py"
- "test_zlib.py"))
- #t))
- (add-after 'check 'find-netinet-in-h
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((glibc (assoc-ref inputs "libc")))
- (substitute* (find-files "Lib/plat-generic" ".*")
- (("/usr/include/netinet/in.h")
- (string-append glibc "/include/netinet/in.h")))
- #t)))
- (delete 'move-tk-inter)))
- ;; Python-2.4 does not support '-j'.
- ((#:make-flags _) ''())))
- (native-search-paths
- (list (search-path-specification
- (variable "PYTHONPATH")
- (files '("lib/python2.4/site-packages")))))
- (inputs
- `(("libnsl" ,libnsl)
- ("libtirpc" ,libtirpc)
- ("openssl" ,openssl-1.0)
- ,@(alist-delete "openssl" (package-inputs python-2))))))
-
(define (default-python2.4)
"Return the default Python-2.4 package."
;; Lazily resolve the binding.
- (let ((python (resolve-interface '(gn packages python24))))
+ (let ((python (resolve-interface '(past packages python))))
(module-ref python 'python-2.4)))
;; We borrow this from (guix build-system python) since we cannot refer to it
diff --git a/gn/packages/web.scm b/gn/packages/web.scm
index ebcd0db..9589586 100644
--- a/gn/packages/web.scm
+++ b/gn/packages/web.scm
@@ -4,7 +4,7 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages compression)
#:use-module (gnu packages fonts)
- #:use-module (gn packages python24)
+ #:use-module (past packages python)
#:use-module (gnu packages python)
#:use-module (gnu packages readline)
#:use-module (gnu packages tcl)
diff --git a/gn/services/genenetwork.scm b/gn/services/genenetwork.scm
index ac7ead4..0137e94 100644
--- a/gn/services/genenetwork.scm
+++ b/gn/services/genenetwork.scm
@@ -2,6 +2,7 @@
(use-modules (gnu)
(ice-9 match)
+ (past packages python)
(gn packages genenetwork)
(gn packages python24)
(gn packages web))