| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages datalog)
|
| 20 | #:use-module (gnu packages bison)
|
| 21 | #:use-module (gnu packages compression)
|
| 22 | #:use-module (gnu packages cpp)
|
| 23 | #:use-module (gnu packages compiler-tools)
|
| 24 | #:use-module (gnu packages libffi)
|
| 25 | #:use-module (gnu packages ncurses)
|
| 26 | #:use-module (gnu packages python)
|
| 27 | #:use-module (gnu packages sqlite)
|
| 28 | #:use-module (guix build-system cmake)
|
| 29 | #:use-module (guix gexp)
|
| 30 | #:use-module (guix git-download)
|
| 31 | #:use-module ((guix licenses) #:prefix license:)
|
| 32 | #:use-module (guix packages))
|
| 33 |
|
| 34 | (define-public souffle
|
| 35 | (package
|
| 36 | (name "souffle")
|
| 37 | (version "2.5")
|
| 38 | (source (origin
|
| 39 | (method git-fetch)
|
| 40 | (uri (git-reference
|
| 41 | (url "https://github.com/souffle-lang/souffle")
|
| 42 | (commit version)))
|
| 43 | (file-name (git-file-name name version))
|
| 44 | (sha256
|
| 45 | (base32
|
| 46 | "1lrw69g02b17vxxz4g7cj8hbmc39wlzl80vl5fwy40a6b9pxwrsj"))
|
| 47 | (snippet
|
| 48 | #~(begin
|
| 49 | |
| 50 | |
| 51 | |
| 52 | (for-each delete-file
|
| 53 | (list "licenses/TCBRINDLE SPAN.txt"
|
| 54 | "licenses/TINYFORMAT.txt"
|
| 55 | "src/include/souffle/utility/span.h"
|
| 56 | "src/include/souffle/utility/tinyformat.h"))))))
|
| 57 | (build-system cmake-build-system)
|
| 58 | (arguments
|
| 59 | (list #:configure-flags #~(list "-DSOUFFLE_GIT=OFF"
|
| 60 | (string-append "-DPACKAGE_VERSION="
|
| 61 | #$version))
|
| 62 | |
| 63 | |
| 64 | |
| 65 | #:test-exclude (string-join
|
| 66 | (list "syntactic/cpp_keywords_run_souffle"
|
| 67 | "syntactic/cpp_keywords_c_run_souffle"
|
| 68 | "syntactic/cpp_keywords_compare_std_outputs"
|
| 69 | "syntactic/cpp_keywords_compare_csv"
|
| 70 | "syntactic/cpp_keywords_c_compare_std_outputs"
|
| 71 | "syntactic/cpp_keywords_c_compare_csv")
|
| 72 | "|")
|
| 73 | #:phases
|
| 74 | #~(modify-phases %standard-phases
|
| 75 | (add-after 'unpack 'replace-bundled-libraries
|
| 76 | (lambda _
|
| 77 | |
| 78 | (substitute* (find-files "src" "\\.(cpp|h)$")
|
| 79 | (("#include \"souffle/utility/tinyformat.h\"")
|
| 80 | "#include <tinyformat.h>"))
|
| 81 | |
| 82 | |
| 83 | (call-with-output-file "src/include/souffle/utility/span.h"
|
| 84 | (lambda (port)
|
| 85 | (display "#pragma once
|
| 86 | #include <tcb/span.hpp>
|
| 87 | namespace souffle {
|
| 88 | using tcb::span;
|
| 89 | }
|
| 90 | "
|
| 91 | port))))))))
|
| 92 | (inputs
|
| 93 | (list libffi
|
| 94 | ncurses
|
| 95 | python
|
| 96 | tcbrindle-span
|
| 97 | sqlite
|
| 98 | zlib))
|
| 99 | (native-inputs
|
| 100 | (list bison
|
| 101 | flex
|
| 102 | tinyformat))
|
| 103 | (home-page "https://souffle-lang.github.io/")
|
| 104 | (synopsis "Datalog variant")
|
| 105 | (description "Soufflé is a variant of Datalog for tool designers crafting
|
| 106 | analyses in Horn clauses. Soufflé synthesizes a native parallel C++ program
|
| 107 | from a logic specification. The Soufflé language is similar to Datalog (but
|
| 108 | has terms known as records), and is frequently used as a domain-specific
|
| 109 | language for analysis problems.")
|
| 110 | (license (list license:upl |
| 111 | |
| 112 | |
| 113 | license:expat))))
|