@@ -11,6 +11,8 @@
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -58,6 +60,7 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages sqlite)
+ #:use-module (gnu packages texinfo)
#:use-module (gnu packages tls)
#:use-module (gnu packages upnp)
#:use-module (gnu packages video)
@@ -253,18 +256,34 @@ supports HTTP, HTTPS and GnuTLS.")
(ftp-directory . "/gnunet")))
(home-page "https://gnunet.org/en/gnurl.html")))
+(define build-common
+ (let ((commit "1915a74bbb4cd2ae9bc541a382dfebc37064a2fd"))
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.taler.net/build-common.git")
+ (commit commit)))
+ (file-name (git-file-name "build-common" commit))
+ (sha256
+ (base32
+ "18a44qf8hdq5hqb9ygi45k0zxlhy5d764kan0cz72ir7p0lxcj2h")))))
+
(define-public gnunet
+ ;; Upstream fixed a few test failures for us \o/!
+ (let ((commit "3b3faa6bce254289dafed73e98352e2a76f1b94b"))
(package
(name "gnunet")
- (version "0.13.1")
+ (version (string-append "0.14.1" "-" (string-take commit 7)))
(source
(origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/gnunet/gnunet-" version
- ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://git.gnunet.org/gnunet.git")
+ (commit commit)))
+ (file-name (string-append name "-" version))
(sha256
(base32
- "15jnca5zxng7r6m3qzq9lr73xxq0v6mvcp0lny3zrlkz5s2nmmq3"))))
+ "0738wfpmsf4cy9xk63198ihp09ji7bvr6qvjrd0fi45xfgk8wvbz"))))
(build-system gnu-build-system)
(inputs
`(("bluez" ,bluez)
@@ -289,7 +308,15 @@ supports HTTP, HTTPS and GnuTLS.")
("zbar" ,zbar)
("zlib" ,zlib)))
(native-inputs
- `(("curl" ,curl)
+ ;; For building from git
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("gettext" ,gettext-minimal)
+ ("texinfo" ,texinfo) ; makeinfo
+
+ ("build-common" ,build-common)
+ ("curl" ,curl) ;; test_plugin_rest_namestore.sh
("pkg-config" ,pkg-config)
("python" ,python)
("xxd" ,xxd)
@@ -298,38 +325,38 @@ supports HTTP, HTTPS and GnuTLS.")
'(#:parallel-tests? #f ; Parallel tests aren't supported.
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'fixup-pofile-writability
+ (lambda _
+ ;; bootstrap expects this to be writable
+ (chmod "po/POTFILES.in" #o700)
+ ;; Also not writable for some reason.
+ (for-each
+ (lambda (file) (chmod file #o700))
+ (find-files "po/" "po$"))
+ #t))
+ (add-before 'bootstrap 'add-build-common-submodule
+ (lambda* (#:key inputs native-inputs #:allow-other-keys)
+ (let ((build-common (assoc-ref (or native-inputs inputs) "build-common")))
+ ;; When building from git, include the contrib/build-common
+ ;; submodule.
+ (when build-common
+ (delete-file-recursively "contrib/build-common")
+ (symlink build-common "contrib/build-common")
+ ;; bootstrap expects this to be writable
+ ;; or non-existent, which isn't the case.
+ (delete-file "contrib/Makefile.inc")))
+ #t))
(add-after 'configure 'remove-failing-tests
;; These tests fail in Guix's building environment.
(lambda _
(substitute* "src/transport/Makefile"
- (("\\$\\(am__EXEEXT_15\\)") "") ; test_transport_api_https
- (("test_transport_api_manipulation_cfg\\$\\(EXEEXT\\) \\\\\n") "")
- (("test_transport_api_udp_nat\\$\\(EXEEXT\\) \\\\\n") "")
- (("test_transport_blacklisting_multiple_plugins\\$\\(EXEEXT\\) \\\\\n") ""))
- (substitute* "src/testbed/Makefile"
- (("test_testbed_api_2peers_1controller\\$\\(EXEEXT\\) \\\\\n") "")
- (("test_testbed_api_statistics\\$\\(EXEEXT\\) \\\\\n") "")
- (("test_testbed_api_test\\$\\(EXEEXT\\) \\\\\n") "")
- (("test_testbed_api_test_timeout\\$\\(EXEEXT\\) \\\\\n") "")
- (("test_testbed_api_topology\\$\\(EXEEXT\\) \\\\\n") "")
- (("test_testbed_api_topology_clique\\$\\(EXEEXT\\) \\\\\n") ""))
- (substitute* "src/topology/Makefile"
- (("^check_PROGRAMS.*") "\n")
- (("test_gnunet_daemon_topology\\$\\(EXEEXT\\)\n") ""))
- (substitute* "src/namestore/Makefile"
- (("\\$\\(am__append_2\\)") ""))
- (substitute* "src/gns/Makefile"
- (("\\$\\(am__append_4\\)") ""))
- (substitute* "contrib/Makefile"
- (("^check_PROGRAMS.*") "\n"))
- ;; 'test' from coreutils doesn't behave as the test expects.
+ (("\\$\\(am__EXEEXT_15\\)") "")) ; test_transport_api_https
+ (substitute* "src/setu/Makefile"
+ (("test_setu_api ") ""))
(substitute* '("src/gns/gnunet-gns-proxy-setup-ca.in"
"src/transport/gnunet-transport-certificate-creation.in")
(("gnutls-certtool") "certtool"))
#t))
- (add-before 'check 'set-env-var-for-tests
- (lambda _
- (setenv "LANG" "en_US.UTF-8")))
;; Swap 'check and 'install phases and add installed binaries to $PATH.
(add-before 'check 'set-path-for-check
(lambda* (#:key outputs #:allow-other-keys)
@@ -349,7 +376,7 @@ that sense aims to replace the current internet protocol stack. Along with
an application for secure publication of files, it has grown to include all
kinds of basic applications for the foundation of a GNU internet.")
(license license:agpl3+)
- (home-page "https://gnunet.org/")))
+ (home-page "https://gnunet.org/"))))
(define-public guile-gnunet ;GSoC 2015!
(let ((commit "d12167ab3c8d7d6caffd9c606e389ef043760602")