aboutsummaryrefslogtreecommitdiff
path: root/gn
diff options
context:
space:
mode:
Diffstat (limited to 'gn')
-rw-r--r--gn/packages/python.scm77
1 files changed, 74 insertions, 3 deletions
diff --git a/gn/packages/python.scm b/gn/packages/python.scm
index c8a4a46..032f4f1 100644
--- a/gn/packages/python.scm
+++ b/gn/packages/python.scm
@@ -2,6 +2,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages attr)
+ #:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages databases)
#:use-module (gnu packages fontutils)
@@ -29,7 +30,6 @@
#:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
#:use-module (gnu packages web)
- #:use-module (gnu packages base)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (gnu packages zip)
@@ -273,6 +273,63 @@ powerful language for representing information.")
(define-public python2-mysqlclient
(package-with-python2 python-mysqlclient))
+(define-public python2-htmlgen-old
+(package
+ (name "python2-htmlgen-old")
+ (version "2.2.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "http://ftp.nl.debian.org/debian/pool/main/h/htmlgen/htmlgen_"
+version ".orig.tar.gz"))
+ (sha256
+ (base32
+ "186kb434q6z84g31ysvzi4kcfcvl3pmm57k4jlng4ccgls94x6wb"))
+ (patches (list
+ (search-patch "python2-htmlgen-Applied-Deb-patch.patch")
+ (search-patch "python2-htmlgen-Fix-test-for-random.patch")
+ ))))
+ (build-system gnu-build-system)
+ (outputs
+ '("out"))
+ (native-inputs `(("tar" ,tar)
+ ("gzip" ,gzip)))
+ (inputs
+ `(("make" ,gnu-make)))
+ (propagated-inputs
+ `(("python2" ,python-2)))
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (gzip (assoc-ref %build-inputs "gzip"))
+ (output (assoc-ref %outputs "out"))
+ (srcdir (string-append output "/src"))
+ (lib (string-append (assoc-ref %outputs "out") "/lib/htmlgen"))
+ (python (string-append (assoc-ref %build-inputs "python2") "/bin/")))
+ (begin
+ (use-modules (guix build utils))
+ (setenv "PATH" (string-append gzip "/bin")) ;; for tar
+ ;; (setenv "PATH" (string-append python "/bin"))
+ (system* (string-append tar "/bin/tar") "xzf"
+ source)
+ (chdir ,(string-append name "-" version))
+ (mkdir-p srcdir)
+ (lambda _
+ (system* "python" "-m" "compileall" "."))
+ (lambda _
+ (system* "make" "test"))
+ (mkdir-p lib)
+ ; (copy-file "." lib)
+ (copy-file "HTMLgen.pyc" lib)
+ ))))
+ (home-page
+ "https://packages.debian.org/unstable/python/python-htmlgen")
+ (synopsis "Python2 HTMLgen (somewhat defunkt project)")
+ (description #f)
+ (license #f)))
+
(define-public python2-htmlgen
(package
(name "python2-htmlgen")
@@ -285,9 +342,23 @@ version ".orig.tar.gz"))
(sha256
(base32
"186kb434q6z84g31ysvzi4kcfcvl3pmm57k4jlng4ccgls94x6wb"))
- (patches (list (search-patch "htmlgen_2.2.2-12.3.patch")
+ (patches (list
+ (search-patch "python2-htmlgen-Applied-Deb-patch.patch")
+ (search-patch "python2-htmlgen-Fix-test-for-random.patch")
))))
- (build-system python-build-system)
+ (build-system gnu-build-system)
+ (inputs
+ `(("make" ,gnu-make)))
+ (propagated-inputs
+ `(("python2" ,python-2)))
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'build
+ (lambda _
+ (zero? (apply system* "make" "test")))))
+
+ #:tests? #f))
(home-page
"https://packages.debian.org/unstable/python/python-htmlgen")
(synopsis "Python2 HTMLgen (somewhat defunkt project)")