guix.scm 3.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
;;; Pubstrate --- ActivityStreams based social networking for Guile
;;; Copyright © 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;;
;;; This file is part of Pubstrate.
;;;
;;; Pubstrate 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.
;;;
;;; Pubstrate 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 Pubstrate.  If not, see <http://www.gnu.org/licenses/>.

19 20 21 22 23 24 25 26 27 28 29 30
;;; Parts borrowed here from guile-sdl2

;;; Guile-sdl2 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 Lesser General Public
;;; License along with guile-sdl2.  If not, see
;;; <http://www.gnu.org/licenses/>.


31 32 33
(use-modules (srfi srfi-1)
             (srfi srfi-26)
             (ice-9 popen)
34 35 36
             (ice-9 match)
             (ice-9 rdelim)
             (guix packages)
37
             (guix build-system gnu)
38 39
             (guix download)
             (guix git-download)
40
             (guix gexp)
41
             ((guix build utils) #:select (with-directory-excursion))
42 43 44 45 46 47
             (gnu packages)
             (gnu packages autotools)
             (gnu packages base)
             (gnu packages guile)
             (gnu packages pkg-config)
             (gnu packages texinfo)
48
             (gnu packages tls)
amirouche's avatar
amirouche committed
49
             (gnu packages gnupg)
50 51
             (guix licenses))

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

54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
(define guile-8sync-latest
  (package
    (inherit guile-8sync)
    (version "git")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
             (url "git://git.savannah.gnu.org/8sync.git")
             (commit "dfde2119df2a0adb86ec4921f95ef2c15692a593")))
       (sha256
        (base32
         "086smlch92n6z5xng0la9l9g6m145klw1c8222cgj32qhyarbkpk"))))
    (arguments
     `(#:phases (modify-phases %standard-phases
                  (add-before 'configure 'bootstrap
                              (lambda _
                                (zero? (system* "./bootstrap.sh")))))))))

73 74 75 76
(define pubstrate
  (package
    (name "pubstrate")
    (version "0.1-pre")
77 78 79
    (source (local-file %source-dir
                        #:recursive? #t
                        #:select? (git-predicate %source-dir)))
80 81 82 83 84 85 86 87 88 89 90 91
    (build-system gnu-build-system)
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'bootstrap
           (lambda _ (zero? (system* "sh" "bootstrap.sh")))))))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("autoconf" ,autoconf)
       ("automake" ,automake)
       ("texinfo" ,texinfo)))
    (inputs
92 93
     `(("guile" ,guile-2.2)
       ("guile-8sync" ,guile-8sync-latest)
amirouche's avatar
amirouche committed
94
       ("libgcrypt" ,libgcrypt)))
95
    (propagated-inputs
96 97
     `(("gnutls" ,gnutls)
       ("guile-gdbm-ffi" ,guile2.2-gdbm-ffi)
98
       ("guile-irregex" ,guile2.2-irregex)
99 100
       ("guile-lib" ,guile2.2-lib)
       ("guile-sjson" ,guile-sjson)))
101
    (home-page #f)
102 103
    (synopsis "ActivityStreams and ActivityPub implementation in Guile.")
    (description "ActivityStreams and ActivityPub implementation in Guile.
104 105 106 107
Includes a full (currently demo) web server.")
    (license gpl3+)))

pubstrate