Browse Source

gn: Use the guix-past channel.

Adjust for python-2.4 being in the guix-past channel.
Efraim Flashner 1 month ago
6 changed files with 15 additions and 99 deletions
  1. +6
  2. +4
  3. +1
  4. +2
  5. +1
  6. +1

+ 6
- 0
.guix-channel View File

@@ -0,0 +1,6 @@
(version 0)
(name guix-past)
(url ""))))

+ 4
- 3 View File

@@ -19,7 +19,7 @@ To easily use the packages from this repo, simply add it to your
(name 'gn-bioinformatics)
(url "")
(url "")
(branch "master"))
@@ -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
export GUIX_PACKAGE_PATH=$PWD/guix-bioinformatics/
git clone
git clone
export GUIX_PACKAGE_PATH=$PWD/guix-bioinformatics/:$PWD/guix-past/modules
guix package -A cwl

+ 1
- 0
gn/packages/genenetwork.scm View File

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

+ 2
- 95
gn/packages/python24.scm View File

@@ -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
(inherit python-2)
(name "python2.4")
(version "2.4.6")
(method url-fetch)
(uri (string-append ""
version "/Python-" version ".tar.bz2"))
(outputs '("out"))
(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))))
(add-after 'unpack 'patch-rpc-location
(lambda _
(substitute* "Modules/nismodule.c"
(("<rpc/") "<tirpc/rpc/"))
(substitute* ""
(("\\['nsl'") "['nsl', 'tirpc'"))
(add-after 'unpack 'skip-crypt-module
(lambda _
(substitute* ""
((".*cryptmodule.c.*") "\n"))
(add-before 'check 'delete-failing-tests
(lambda _
(lambda (file)
(delete-file (string-append "Lib/test/" file)))
'("" "" ""
"" "" ""
"" "" ""
"" "" ""
(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" ".*")
(string-append glibc "/include/netinet/in.h")))
(delete 'move-tk-inter)))
;; Python-2.4 does not support '-j'.
((#:make-flags _) ''())))
(list (search-path-specification
(variable "PYTHONPATH")
(files '("lib/python2.4/site-packages")))))
`(("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

+ 1
- 1
gn/packages/web.scm View File

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

+ 1
- 0
gn/services/genenetwork.scm View File

@@ -2,6 +2,7 @@

(use-modules (gnu)
(ice-9 match)
(past packages python)
(gn packages genenetwork)
(gn packages python24)
(gn packages web))