123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453 |
- ;;; packages - package definitions for GNU Guix
- ;;; Copyright (C) 2016, 2017 ng0
- ;;;
- ;;; This program is free software: you can redistribute it and/or modify
- ;;; it under the terms of the GNU Affero General Public License as
- ;;; published by the Free Software Foundation, either version 3 of the
- ;;; License, or (at your option) any later version.
- ;;;
- ;;; This program 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 Affero General Public License for more details.
- ;;;
- ;;; You should have received a copy of the GNU Affero General Public License
- ;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
- (define-module (ng0 packages gnunet)
- #:use-module (guix build-system gnu)
- #:use-module (guix download)
- #:use-module (guix git-download)
- #:use-module ((guix licenses) #:prefix license:)
- #:use-module (guix packages)
- #:use-module (gnu packages)
- #:use-module (gnu packages admin)
- #:use-module (gnu packages aidc)
- #:use-module (gnu packages autotools)
- #:use-module (gnu packages bison)
- #:use-module (gnu packages compression)
- #:use-module (gnu packages databases)
- #:use-module (gnu packages gettext)
- #:use-module (gnu packages glib)
- #:use-module (gnu packages gnome)
- #:use-module (gnu packages gnunet)
- #:use-module (gnu packages gnupg)
- #:use-module (gnu packages gnuzilla)
- #:use-module (gnu packages gstreamer)
- #:use-module (gnu packages gtk)
- #:use-module (gnu packages libidn)
- #:use-module (gnu packages libunistring)
- #:use-module (gnu packages linux)
- #:use-module (gnu packages man)
- #:use-module (gnu packages image-viewers)
- #:use-module (gnu packages maths)
- #:use-module (gnu packages multiprecision)
- #:use-module (gnu packages ncurses)
- #:use-module (gnu packages pcre)
- #:use-module (gnu packages perl)
- #:use-module (gnu packages pkg-config)
- #:use-module (gnu packages pulseaudio)
- #:use-module (gnu packages python)
- #:use-module (gnu packages tls)
- #:use-module (gnu packages upnp)
- #:use-module (gnu packages web)
- #:use-module (gnu packages xiph))
- ;; TODO: Use HEAD without checking sum of it.
- ;; Explanation for name scheme: UNIXPATH is capped at 108 characters,
- ;; this causes lots of tests to fail.
- (define-public gnunetg
- (let* ((commit "61ef51d43a9069b5a2d680883b5d47c1fb237d82")
- (revision "14"))
- (package
- (inherit gnunet)
- (name "gnunetg")
- (version (string-append "0.10.1" revision
- (string-take commit 7)))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://gnunet.org/git/gnunet.git")
- (commit commit)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1d546nh58h575gcmqki8scnhc7i35dlkaf9x2ci8vv6l43f6pk3q"))))
- (build-system gnu-build-system)
- (inputs
- `(("glpk" ,glpk)
- ("gnurl" ,gnurl)
- ("gstreamer" ,gstreamer)
- ("gst-plugins-base" ,gst-plugins-base)
- ("gnutls" ,gnutls)
- ("libextractor" ,libextractor)
- ("libgcrypt" ,libgcrypt)
- ("libidn" ,libidn)
- ("libmicrohttpd" ,libmicrohttpd)
- ("libltdl" ,libltdl)
- ("libunistring" ,libunistring)
- ("openssl" ,openssl)
- ("opus" ,opus)
- ("pulseaudio" ,pulseaudio)
- ("sqlite" ,sqlite)
- ("zlib" ,zlib)
- ("perl" ,perl)
- ("python" ,python-2) ; tests and gnunet-qr
- ("jansson" ,jansson)
- ("ncurses" ,ncurses)
- ("nss" ,nss)
- ("gmp" ,gmp)
- ("miniupnpc" ,miniupnpc)
- ("bluez" ,bluez) ; for optional bluetooth feature
- ("glib" ,glib)
- ;; ("texlive-minimal" ,texlive-minimal) ; optional.
- ("libogg" ,libogg)))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("autoconf" ,autoconf)
- ("automake" ,automake)
- ("gnu-gettext" ,gnu-gettext)
- ("libtool" ,libtool)))
- (outputs '("out" "debug"))
- (arguments
- `(#:configure-flags
- (list (string-append "--with-nssdir=" %output "/lib")
- "--enable-experimental")
- #:parallel-tests? #f ; parallel building is not functional
- #:tests? #f ; FAIL: test_gnunet_statistics.py
- #:phases
- ;; swap check and install phases and set paths to installed bin
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-bin-sh
- (lambda _
- (substitute* "bootstrap"
- (("contrib/pogen.sh") "sh contrib/pogen.sh"))
- (for-each (lambda (f) (chmod f #o755))
- (find-files "po" ""))
- #t))
- (add-after 'patch-bin-sh 'bootstrap
- (lambda _
- (zero? (system* "sh" "bootstrap"))))
- ;; DISABLED until failing testcases are fixed.
- ;; this test fails in our environment, disable it:
- ;; XXX: specify which ones fail.
- ;; (add-after 'patch-bin-sh 'disable-test_quota_compliance_tcp_asymmetric
- ;; (lambda _
- ;; (substitute* '("src/transport/Makefile.am")
- ;; (("test_quota_compliance_tcp_asymmetric") ""))))
- ;; (("test_quota_compliance_http_asymmetric") "")
- ;; (("test_quota_compliance_https_asymmetric") "")
- ;; (("test_quota_compliance_unix") "")
- ;; (("test_quota_compliance_unix_asymmetric") ""))))
- ;; check is between build and install, fix this to:
- ;; build - install - check, else the test suite fails.
- (delete 'check)))))))
- ;; (add-after 'install 'set-path-for-check
- ;; (lambda* (#:key outputs #:allow-other-keys)
- ;; (let* ((out (assoc-ref outputs "out"))
- ;; (bin (string-append out "/bin"))
- ;; (lib (string-append out "/lib")))
- ;; (setenv "GNUNET_PREFIX" lib)
- ;; (setenv "PATH" (string-append (getenv "PATH") ":" bin))
- ;; ;; XXX: https://gnunet.org/bugs/view.php?id=4619#c11061
- ;; ;; Enable core dump before the tests.
- ;; ;; XXX: HOW??? ulimit -c unlimited
- ;; (zero? (system* "make" "check"))))))))
- (define-public gnunetgpg
- (package
- (inherit gnunetg)
- (name "gnunetgpg")
- (inputs
- `(("postgresql" ,postgresql)
- ,@(package-inputs gnunetg)))
- (synopsis "gnunet, variant with postgres")))
- (define-public gnunetgf
- (package
- (inherit gnunetg)
- (name "gnunetgf")
- (inputs
- `(("postgresql" ,postgresql)
- ("mysql" ,mysql)
- ,@(package-inputs gnunetg)))
- (arguments
- `(#:configure-flags
- (list (string-append "--with-nssdir=" %output "/lib")
- "--enable-gcc-hardening"
- "--enable-linker-hardening"
- "--enable-poisoning"
- "--enable-sanitizer"
- "--enable-experimental"
- "--enable-logging=verbose"
- "CFLAGS=-ggdb -O0")
- #:parallel-tests? #f ; parallel building is not supported.
- ;;#:tests? #f ; fail: test_gnunet_statistics.py
- #:phases
- ;; swap check and install phases and set paths to installed bin
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-bin-sh
- (lambda _
- (substitute* "bootstrap"
- (("contrib/pogen.sh") "sh contrib/pogen.sh"))
- (for-each (lambda (f) (chmod f #o755))
- (find-files "po" ""))
- #t))
- (add-after 'patch-bin-sh 'bootstrap
- (lambda _
- (zero? (system* "sh" "bootstrap"))))
- (delete 'check))))
- (synopsis "gnunet, full git build without tests")))
- ;; A package to run the test suite.
- (define-public gnunetgft
- (package
- (inherit gnunetg)
- (name "gnunetgft")
- (arguments
- `(#:configure-flags
- (list (string-append "--with-nssdir=" %output "/lib")
- "--enable-gcc-hardening"
- "--enable-linker-hardening"
- "--enable-poisoning"
- "--enable-sanitizer"
- "--enable-experimental"
- "--enable-logging=verbose"
- "CFLAGS=-ggdb -O0")
- ;; #:parallel-tests? #f ; parallel building seems to fail
- ;;#:tests? #f ; fail: test_gnunet_statistics.py
- #:phases
- ;; swap check and install phases and set paths to installed bin
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-bin-sh
- (lambda _
- (substitute* "bootstrap"
- (("contrib/pogen.sh") "sh contrib/pogen.sh"))
- (for-each (lambda (f) (chmod f #o755))
- (find-files "po" ""))
- #t))
- (add-after 'patch-bin-sh 'bootstrap
- (lambda _
- (zero? (system* "sh" "bootstrap"))))
- (delete 'check)
- ;; XXX: https://gnunet.org/bugs/view.php?id=4619
- (add-after 'install 'set-path-for-check
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (lib (string-append out "/lib")))
- (setenv "GNUNET_PREFIX" lib)
- (setenv "PATH" (string-append (getenv "PATH") ":" bin))
- (zero? (system* "make" "check"))))))))
- (synopsis "gnunet, full git with tests enabled with parallel tests")))
- ;; A package for debugging memory leaks revealed by the test suite - no ASan
- (define-public gnunetgft-no-asan
- (package
- (inherit gnunetg)
- (name "gnunetgft-no-asan")
- (arguments
- `(#:configure-flags
- (list (string-append "--with-nssdir=" %output "/lib")
- "--enable-gcc-hardening"
- "--enable-linker-hardening"
- "--enable-poisoning"
- "--enable-experimental"
- "--enable-logging=verbose"
- "CFLAGS=-ggdb -O0")
- ;; #:parallel-tests? #f ; parallel building seems to fail
- ;;#:tests? #f ; fail: test_gnunet_statistics.py
- #:phases
- ;; swap check and install phases and set paths to installed bin
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-bin-sh
- (lambda _
- (substitute* "bootstrap"
- (("contrib/pogen.sh") "sh contrib/pogen.sh"))
- (for-each (lambda (f) (chmod f #o755))
- (find-files "po" ""))
- #t))
- (add-after 'patch-bin-sh 'bootstrap
- (lambda _
- (zero? (system* "sh" "bootstrap"))))
- (delete 'check)
- ;; XXX: https://gnunet.org/bugs/view.php?id=4619
- (add-after 'install 'set-path-for-check
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (lib (string-append out "/lib")))
- (setenv "GNUNET_PREFIX" lib)
- (setenv "PATH" (string-append (getenv "PATH") ":" bin))
- (zero? (system* "make" "check"))))))))
- (synopsis "gnunet, full git, without address sanitizer and with tests enabled")))
- ;; ... and one package to test the package with "parallel-tests? #f"
- (define-public gnunetgftn
- (package
- (inherit gnunetg)
- (name "gnunetgftn")
- (arguments
- `(#:configure-flags
- (list (string-append "--with-nssdir=" %output "/lib")
- "--enable-gcc-hardening"
- "--enable-linker-hardening"
- "--enable-poisoning"
- "--enable-sanitizer"
- "--enable-experimental"
- "--enable-logging=verbose"
- "CFLAGS=-ggdb"); -O0")
- #:parallel-tests? #f ; parallel building seems to fail
- ;;#:tests? #f ; fail: test_gnunet_statistics.py
- #:phases
- ;; swap check and install phases and set paths to installed bin
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-bin-sh
- (lambda _
- (substitute* "bootstrap"
- (("contrib/pogen.sh") "sh contrib/pogen.sh"))
- (for-each (lambda (f) (chmod f #o755))
- (find-files "po" ""))
- #t))
- (add-after 'patch-bin-sh 'bootstrap
- (lambda _
- (zero? (system* "sh" "bootstrap"))))
- (delete 'check)
- ;; XXX: https://gnunet.org/bugs/view.php?id=4619
- (add-after 'install 'set-path-for-check
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin"))
- (lib (string-append out "/lib")))
- (setenv "GNUNET_PREFIX" lib)
- (setenv "PATH" (string-append (getenv "PATH") ":" bin))
- (zero? (system* "make" "check"))))))))))
- (define-public gnunet-gtkg
- (let* ((commit "087f8e166ee6d1fc59a6bd5d05f656528761ede7")
- (revision "5"))
- (package
- (inherit gnunetgf)
- (name "gnunet-gtkg")
- (version (package-version gnunetgf))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://gnunet.org/git/gnunet-gtk.git")
- (commit commit)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "1k03d8l0yz4fpliy5bg5s7qkpidzd6ryr4cd63wgmd227p32i87q"))))
- (arguments
- `(#:configure-flags
- (list "--with-libunique"
- "--with-qrencode"
- (string-append "--with-gnunet="
- (assoc-ref %build-inputs "gnunetgf")))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'bootstrap
- (lambda _
- (zero? (system* "autoreconf" "-vfi")))))))
- (inputs
- `(("gnunetgf" ,gnunetgf)
- ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
- ("gnutls" ,gnutls)
- ("libgcrypt" ,libgcrypt)
- ("gtk+" ,gtk+)
- ("libextractor" ,libextractor)
- ("glade3" ,glade3)
- ("qrencode" ,qrencode)
- ("libunique" ,libunique)))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("libglade" ,libglade)
- ("autoconf" ,autoconf)
- ("gnu-gettext" ,gnu-gettext)
- ("automake" ,automake)
- ("libtool" ,libtool)))
- (synopsis "Graphical front-end tools for GNUnet")
- (home-page "https://gnunet.org"))))
- ;; fuse, pointing to the tests disabled version of gnunet-git
- (define-public gnunet-fuse
- (let* ((commit "c25f3acb22f386f2836cd7c7ae21fcef272c0352")
- (revision "2"))
- (package
- (inherit gnunetg)
- (name "gnunet-fuse")
- (version (package-version gnunetgf))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://gnunet.org/git/gnunet-fuse.git")
- (commit commit)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "131b7zgy94n10lamn6m5ijzfw9mqzanq3g0k69fszx674rx0ql6s"))))
- (arguments
- `(#:configure-flags
- (list "--with-qrencode"
- (string-append "--with-gnunet="
- (assoc-ref %build-inputs "gnunetgf")))
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'bootstrap
- (lambda _
- (zero? (system* "autoreconf" "-vfi")))))))
- (inputs
- `(("gnunetgf" ,gnunetgf)))
- (native-inputs
- `(("pkg-config" ,pkg-config)
- ("fuse" ,fuse)
- ("autoconf" ,autoconf)
- ("gnu-gettext" ,gnu-gettext)
- ("automake" ,automake)
- ("libtool" ,libtool)))
- (synopsis "Graphical front-end tools for GNUnet")
- (home-page "https://gnunet.org"))))
- ;; A package to run the test suite (with libressl)
- (define-public gnunetgftl
- (package
- (inherit gnunetg)
- (name "gnunetgftl")
- (inputs
- `(("glpk" ,glpk)
- ("gnurl" ,gnurl)
- ("gstreamer" ,gstreamer)
- ("gst-plugins-base" ,gst-plugins-base)
- ("gnutls" ,gnutls)
- ("libextractor" ,libextractor)
- ("libgcrypt" ,libgcrypt)
- ("libidn" ,libidn)
- ("libmicrohttpd" ,libmicrohttpd)
- ("libltdl" ,libltdl)
- ("libunistring" ,libunistring)
- ("libressl" ,libressl)
- ("opus" ,opus)
- ("pulseaudio" ,pulseaudio)
- ("sqlite" ,sqlite)
- ("zlib" ,zlib)
- ("perl" ,perl)
- ("python" ,python-2) ; tests and gnunet-qr
- ("postgresql" ,postgresql)
- ("jansson" ,jansson)
- ("ncurses" ,ncurses)
- ("nss" ,nss)
- ("gmp" ,gmp)
- ("miniupnpc" ,miniupnpc)
- ("bluez" ,bluez) ; for optional bluetooth feature
- ("glib" ,glib)
- ;; ("texlive-minimal" ,texlive-minimal) ; optional.
- ("libogg" ,libogg)))
- (synopsis "gnunet git full with tests and libressl")))
|