aboutsummaryrefslogtreecommitdiff
path: root/guix.scm
blob: 22364a4bc25504ab0bd90520d4a70cbf8d3f7816 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix 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 General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
;;;
;;;  SPDX-License-Identifier: GPL-3.0-or-later

(use-modules (gnu packages guile)
	     (gnu packages guile-xyz)
	     (gnu packages autotools)
	     (gnu packages gettext)
	     (gnu packages pkg-config)
	     (gnu packages xorg)
	     (gnu packages text-editors)
	     (guix packages)
	     (guix gexp)
	     (guix git)
	     (guix git-download)
	     (guix download)
	     (guix build-system gnu)
	     ((guix licenses) #:prefix license:))

(define guile-3.0/fixed
  (package
    (inherit guile-3.0-latest)
    (source
     (origin
       (inherit (package-source guile-3.0-latest))
       (patches (list (local-file "0001-Fix-non-revealed-port-is-closed-ports.test.patch")
		      (local-file "0001-ice-9-read-Parse-properly.patch")))))))

;; This has some I/O patches (wait-until-port-readable-operation),
;; see <https://github.com/wingo/fibers/pull/50>.
(define-public guile-fibers/patched
  (package
   (inherit guile-fibers)
   (source (origin
            (method git-fetch)
            (uri (git-reference
                  (url "https://notabug.org/maximed/fibers")
                  (commit "4658b62b402e7d4920ab528da1b42835cea03429")))
            (sha256
             (base32 "1956rz411p3yf7a75z2k1hii88kmn25y2p32bw6w45yy8pynm1rg"))))
   (native-inputs
    `(("autoconf" ,autoconf)
      ("gettext" ,gettext-minimal)
      ("libtool" ,libtool)
      ("automake" ,automake)
      ,@(package-native-inputs guile-fibers)))))

(define %source-dir (dirname (current-filename)))

(define-public scheme-gnunet
  (package
   (name "scheme-gnunet")
   (version "0.1")
   (source (local-file %source-dir
		       #:recursive? #t
		       #:select? (git-predicate %source-dir)))
   (build-system gnu-build-system)
   (arguments
    '(#:configure-flags
      (list
       "--with-guile-site-dir=$(datarootdir)/guile/site/$(GUILE_EFFECTIVE_VERSION)"
       "--with-guile-site-ccache-dir=$(libdir)/guile/site/$(GUILE_EFFECTIVE_VERSION)/site-ccache")))
   (propagated-inputs `(("guile-zlib" ,guile-zlib)
			("guile-bytestructures" ,guile-bytestructures)
			("guile-fibers" ,guile-fibers/patched)
			("guile-json" ,guile-json-4)
			("guile-pfds" ,guile-pfds)))
   (native-inputs `(("guile" ,guile-3.0/fixed)
		    ("guile-json-4" ,guile-json-4)
		    ("guile-pfds" ,guile-pfds)
		    ("automake" ,automake)
		    ;; Only used for testing.
		    ("guile-quickcheck" ,guile-quickcheck)
                    ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'.
		    ("gettext" ,gettext-minimal)
		    ("pkg-config" ,pkg-config)
		    ("autoconf" ,autoconf-wrapper)
		    ("texmacs" ,texmacs)
		    ("xvfb-run" ,xvfb-run)))
   (inputs `(("guile" ,guile-3.0/fixed)))
   (synopsis "partial Scheme port of GNUnet")
   (license license:agpl3+)
   (description #f)
   (home-page #f)))
scheme-gnunet