aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/databases.scm
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-06-12 22:02:04 -0400
committerLeo Famulari <leo@famulari.name>2016-06-12 22:09:26 -0400
commitee86e7e14859533045e1f7727ae731ba6ba72daf (patch)
treea5f51a9c4859a3242b46876797b98e77a5a7506e /gnu/packages/databases.scm
parent8af5cac527eee03005f3809578a0d8258a878f95 (diff)
parentfe585be9aa8f5158a7dfb6477d19ece3d643dec3 (diff)
downloadpatches-ee86e7e14859533045e1f7727ae731ba6ba72daf.tar
patches-ee86e7e14859533045e1f7727ae731ba6ba72daf.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/databases.scm')
-rw-r--r--gnu/packages/databases.scm61
1 files changed, 61 insertions, 0 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 80aa54f7a2..a912166e84 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -405,6 +405,67 @@ types are supported, as is encryption.")
(license gpl3+)
(home-page "http://www.gnu.org/software/recutils/")))
+(define-public sparql-query
+ (package
+ (name "sparql-query")
+ (version "1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/tialaramex/"
+ name "/archive/" version ".tar.gz"))
+ (sha256
+ (base32 "0yq3k20472rv8npcc420q9ab6idy584g5y0q501d360k5q0ggr8w"))
+ (file-name (string-append name "-" version ".tar.gz"))))
+ (build-system gnu-build-system)
+ (inputs
+ `(("readline" ,readline)
+ ("ncurses" ,ncurses)
+ ("glib" ,glib)
+ ("libxml2" ,libxml2)
+ ("curl" ,curl)))
+ (native-inputs
+ `(("pkg-config" ,pkg-config)))
+ (arguments
+ `(#:make-flags '("CC=gcc")
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ ;; The Makefile uses git to obtain versioning information. This phase
+ ;; substitutes the git invocation with the package version.
+ (add-after 'unpack 'remove-git-dependency
+ (lambda _
+ (substitute* "Makefile"
+ (("^gitrev :=.*$")
+ (string-append "gitrev = \"v" ,version "\"")))))
+ ;; The install phase of the Makefile assumes $PREFIX/usr/local/bin.
+ ;; This replacement does the same thing, except for using $PREFIX/bin
+ ;; instead.
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "sparql-query" bin)
+ (system* "ln" "--symbolic"
+ (string-append bin "/sparql-query")
+ (string-append bin "/sparql-update")))))
+ (replace 'check
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (and
+ (zero? (apply system* "make" `(,@make-flags "scan-test")))
+ (zero? (system "./scan-test"))))))))
+ (home-page "https://github.com/tialaramex/sparql-query/")
+ (synopsis "Command-line tool for accessing SPARQL endpoints over HTTP")
+ (description "Sparql-query is a command-line tool for accessing SPARQL
+endpoints over HTTP. It has been intentionally designed to 'feel' similar to
+tools for interrogating SQL databases. For example, you can enter a query over
+several lines, using a semi-colon at the end of a line to indicate the end of
+your query. It also supports readline so that you can more easily recall and
+edit previous queries, even across sessions. It can be used non-interactively,
+for example from a shell script.")
+ ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while
+ ;; others (like sparql-query.c) contain a GPLv2+ license header.
+ (license (list gpl3+))))
+
(define-public sqlite
(package
(name "sqlite")