mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 12:15:12 +00:00
[MERGE] Add Guix support (see #18)
Reviewed-on: https://git.kappach.at/lda/Parsee/pulls/18
This commit is contained in:
commit
4eaec4687e
4 changed files with 94 additions and 0 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -26,3 +26,7 @@ tags
|
||||||
!.forgejo/*
|
!.forgejo/*
|
||||||
!.forgejo/**
|
!.forgejo/**
|
||||||
|
|
||||||
|
!.guix
|
||||||
|
!.guix/*
|
||||||
|
!.guix/**
|
||||||
|
|
||||||
|
|
|
||||||
82
.guix/modules/parsee.scm
Normal file
82
.guix/modules/parsee.scm
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
(define-module (parsee)
|
||||||
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix git-download)
|
||||||
|
#:use-module (guix build-system gnu)
|
||||||
|
#:use-module (guix gexp)
|
||||||
|
#:use-module (guix utils)
|
||||||
|
#:use-module (gnu packages tls)
|
||||||
|
#:use-module (gnu packages databases)
|
||||||
|
#:use-module ((guix licenses) #:prefix license:))
|
||||||
|
|
||||||
|
(define vcs-file?
|
||||||
|
(or (git-predicate
|
||||||
|
(dirname (dirname (current-source-directory))))
|
||||||
|
(const #t)))
|
||||||
|
|
||||||
|
(define-public cytoplasm
|
||||||
|
(let ((commit "32f31fe6d61583630995d956ed7bd7566c4dc14f")
|
||||||
|
(revision "0"))
|
||||||
|
(package
|
||||||
|
(name "cytoplasm")
|
||||||
|
(version (git-version "0.4.1" revision commit))
|
||||||
|
(source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url "https://git.telodendria.io/Telodendria/Cytoplasm")
|
||||||
|
(commit commit)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
|
(sha256
|
||||||
|
(base32 "09x5xfswryf3wjs1synh972yr2fmpjmffi7pjyjdzb4asqh4whrv"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:tests? #f
|
||||||
|
#:configure-flags #~'("--with-lmdb")
|
||||||
|
#:phases #~(modify-phases %standard-phases
|
||||||
|
(add-before 'configure 'add-ld-flags
|
||||||
|
(lambda _
|
||||||
|
(substitute* "./configure"
|
||||||
|
(("(LDFLAGS=\"\\$\\{LIBS\\} \\$\\{LDFLAGS\\})\"" all flags)
|
||||||
|
(string-append flags " -Wl,-rpath=" #$output "/lib\"")))
|
||||||
|
(mkdir-p (string-append #$output "/lib"))))
|
||||||
|
(replace 'configure
|
||||||
|
(lambda* (#:key configure-flags #:allow-other-keys)
|
||||||
|
(apply invoke `("./configure"
|
||||||
|
,(string-append "--prefix=" #$output)
|
||||||
|
,@configure-flags)))))))
|
||||||
|
(inputs (list openssl lmdb))
|
||||||
|
(home-page "https://git.telodendria.io/Telodendria/Cytoplasm")
|
||||||
|
(synopsis "General-purpose high-level networked C library")
|
||||||
|
(description "Cytoplasm is a general-purpose C library for creating
|
||||||
|
high-level (particularly networked and multi-threaded) C applications.")
|
||||||
|
(license license:expat))))
|
||||||
|
|
||||||
|
(define-public parsee
|
||||||
|
(package
|
||||||
|
(name "parsee")
|
||||||
|
(version "0.0.1-git")
|
||||||
|
(source
|
||||||
|
(local-file "../.." "parsee-checkout"
|
||||||
|
#:recursive? #t
|
||||||
|
#:select? vcs-file?))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:tests? #f
|
||||||
|
#:make-flags #~(list "CC=gcc"
|
||||||
|
(string-append "CYTO_INC=" #$cytoplasm "/include")
|
||||||
|
(string-append "CYTO_LIB=" #$cytoplasm "/lib")
|
||||||
|
(string-append "PREFIX=" #$output))
|
||||||
|
#:phases #~(modify-phases %standard-phases
|
||||||
|
(replace 'configure
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((gcc (string-append (assoc-ref inputs "gcc") "/bin/gcc")))
|
||||||
|
(invoke gcc "configure.c" "-o" "configure")
|
||||||
|
(invoke "./configure")))))))
|
||||||
|
(home-page "https://git.kappach.at/lda/Parsee")
|
||||||
|
(synopsis "Jealous Matrix to XMPP bridge")
|
||||||
|
(description "Parsee is a Matrix-XMPP bridge written in C99 with Cytoplasm.")
|
||||||
|
(license license:agpl3+)))
|
||||||
|
|
||||||
|
parsee
|
||||||
|
|
@ -43,6 +43,13 @@ Parsee tries to avoid dependencies aside from [Cytoplasm](https://git.telodendri
|
||||||
Itself optionally depends on a good POSIX implementation, and optionally OpenSSL/LMDB (highly recommended, but
|
Itself optionally depends on a good POSIX implementation, and optionally OpenSSL/LMDB (highly recommended, but
|
||||||
you can get away without those if you're adventurous).
|
you can get away without those if you're adventurous).
|
||||||
|
|
||||||
|
### BUILDING WITH GUIX
|
||||||
|
If you have [Guix](https://guix.gnu.org/) installed, you can build Parsee using `guix package -f guix.scm`, or test it
|
||||||
|
using `guix shell -f guix.scm`. You can also generate a Docker/OCI image.
|
||||||
|
```sh
|
||||||
|
guix pack -f docker -S /bin=bin -L.guix/modules parsee
|
||||||
|
```
|
||||||
|
|
||||||
## RUNNING
|
## RUNNING
|
||||||
First off, you may want to configure Parsee by running the `config` tool(generally named
|
First off, you may want to configure Parsee by running the `config` tool(generally named
|
||||||
`parsee-config` in most cases), with the correct flags, like here.
|
`parsee-config` in most cases), with the correct flags, like here.
|
||||||
|
|
|
||||||
1
guix.scm
Symbolic link
1
guix.scm
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
.guix/modules/parsee.scm
|
||||||
Loading…
Add table
Add a link
Reference in a new issue