dev.fron.io rc / df87073
packages: add biboumi Tony Olagbaiye a month ago
3 changed file(s) with 150 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 --- a/CMakeLists.txt
1 +++ b/CMakeLists.txt
2 @@ -303,27 +303,6 @@
3 endforeach()
4
5 #
6 -## Add a rule to download the catch unit test framework
7 -#
8 -include(ExternalProject)
9 -ExternalProject_Add(catch
10 - GIT_REPOSITORY "https://lab.louiz.org/louiz/Catch.git"
11 - PREFIX "external"
12 - UPDATE_COMMAND ""
13 - CONFIGURE_COMMAND ""
14 - BUILD_COMMAND ""
15 - INSTALL_COMMAND ""
16 - )
17 -set_target_properties(catch PROPERTIES EXCLUDE_FROM_ALL TRUE)
18 -ExternalProject_Get_Property(catch SOURCE_DIR)
19 -if(NOT EXISTS ${CMAKE_SOURCE_DIR}/tests/catch.hpp)
20 - target_include_directories(test_suite
21 - PUBLIC "${SOURCE_DIR}/single_include/"
22 - )
23 - add_dependencies(test_suite catch)
24 -endif()
25 -
26 -#
27 ## Add some custom rules to launch the tests
28 #
29 add_custom_target(check COMMAND "test_suite"
0 (define-module (rc packages biboumi)
1 #:use-module (rc packages)
2 #:use-module (guix gexp)
3 #:use-module (guix packages)
4 #:use-module (guix download)
5 #:use-module (guix git-download)
6 #:use-module ((guix licenses) #:prefix license:)
7 #:use-module (guix build-system trivial)
8 #:use-module (guix build-system cmake)
9 #:use-module (gnu packages linux)
10 #:use-module (gnu packages python)
11 #:use-module (gnu packages xml)
12 #:use-module (gnu packages gnupg)
13 #:use-module (gnu packages crypto)
14 #:use-module (gnu packages sphinx)
15 #:use-module (gnu packages pkg-config)
16 #:use-module (gnu packages base)
17 #:use-module (gnu packages libidn)
18 #:use-module (gnu packages databases)
19 #:use-module (gnu packages sqlite)
20 #:export (biboumi))
21
22 (define catch
23 (package
24 (name "biboumi")
25 (version "2.2.1")
26 (source
27 (origin
28 (method git-fetch)
29 (uri (git-reference
30 (url "https://lab.louiz.org/louiz/Catch.git")
31 (commit "0a34cc201ef28bf25c88b0062f331369596cb7b7")))
32 (sha256
33 (base32
34 "0ad0sjhmzx61a763d2ali4vkj8aa1sbknnldks7xlf4gy83jfrbl"))))
35 (build-system trivial-build-system)
36 (home-page "")
37 (synopsis "")
38 (description "")
39 (license license:boost1.0)))
40
41 (define biboumi
42 (package
43 (name "biboumi")
44 (version "9.0")
45 (source
46 (origin
47 (method url-fetch)
48 (uri (string-append "https://git.louiz.org/biboumi/snapshot/biboumi-"
49 version
50 ".tar.xz"))
51 (sha256
52 (base32
53 "1jvygri165aknmvlinx3jb8cclny6cxdykjf8dp0a3l3228rmzqy"))
54 (patches (search-patches "biboumi-without-catch.patch"))
55 (modules '((guix build utils)))
56 (snippet
57 #~(begin
58 (mkdir-p "tests")
59 (copy-file #$(file-append (package-source catch)
60 "/single_include/catch.hpp")
61 "./tests/catch.hpp")
62 #t))))
63 (build-system cmake-build-system)
64 (arguments
65 `(#:phases
66 (modify-phases %standard-phases
67 (add-before 'configure 'fix-cmakelists
68 (lambda* (#:key outputs #:allow-other-keys)
69 (let* ((out (assoc-ref outputs "out")))
70 (substitute* "CMakeLists.txt"
71 (("/etc/biboumi")
72 (string-append out "/etc/biboumi")))))))
73 #:tests? #f))
74 (native-inputs `(("python-sphinx" ,python-sphinx)
75 ("python" ,python-wrapper)))
76 (inputs `(("util-linux" ,util-linux "lib") ; libuuid
77 ("libgcrypt" ,libgcrypt)
78 ("expat" ,expat)
79 ("botan" ,botan)
80 ("libiconv" ,libiconv)
81 ("libidn" ,libidn)
82 ("postgresql" ,postgresql)
83 ("sqlite" ,sqlite)
84 ("pkg-config" ,pkg-config)))
85 ; systemd udns
86 (home-page "https://biboumi.louiz.org/")
87 (synopsis "XMPP gateway to IRC")
88 (description "XMPP gateway to IRC")
89 (license license:zlib)))
0 (define-module (rc packages)
1 #:use-module ((gnu packages) #:prefix gnu:)
2 #:use-module (guix diagnostics)
3 #:use-module (guix i18n)
4 #:use-module (srfi srfi-1)
5 #:export (search-patch
6 search-patches
7 %patch-path))
8
9 (define %channel-root
10 (find (lambda (path)
11 (file-exists? (string-append path "/rc/packages.scm")))
12 %load-path))
13
14 (define %patch-path
15 (make-parameter
16 (append
17 (list (string-append %channel-root "/patches"))
18 (gnu:%patch-path))))
19
20 (define (search-patch file-name)
21 "Search the patch FILE-NAME. Raise an error if not found."
22 (or (search-path (%patch-path) file-name)
23 (raise (formatted-message (G_ "~a: patch not found")
24 file-name))))
25
26 (define-syntax-rule (search-patches file-name ...)
27 "Return the list of absolute file names corresponding to each
28 FILE-NAME found in %PATCH-PATH."
29 (list (search-patch file-name) ...))