aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-01-28 22:57:27 +0100
committerMarius Bakke <marius@gnu.org>2022-01-29 12:52:38 +0100
commit81873cbc5d42b2d404ae01fb3e64e946f21f4004 (patch)
tree65cd8954a2272fdd0fed859f36fc6e3caa50ced3 /gnu/packages
parent8fa6f975d4bb87b3d177722221e4db4263d8b5f9 (diff)
downloadguix-81873cbc5d42b2d404ae01fb3e64e946f21f4004.tar.gz
guix-81873cbc5d42b2d404ae01fb3e64e946f21f4004.zip
gnu: Add TimescaleDB.
* gnu/packages/databases.scm (timescaledb): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/databases.scm79
1 files changed, 79 insertions, 0 deletions
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index cfa1743d75..f6c1046a51 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -1319,6 +1319,85 @@ pictures, sounds, or video.")
(define-public postgresql postgresql-13)
+(define-public timescaledb
+ (package
+ (name "timescaledb")
+ (version "2.5.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/timescale/timescaledb")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "174dm3higa0i7al9r2hdv5hk36pd0d5fnqj57w5a350kxshxyvyw"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Remove files carrying the proprietary TIMESCALE license.
+ '(begin
+ (delete-file-recursively "tsl")
+ (for-each delete-file
+ '("test/perl/AccessNode.pm"
+ "test/perl/DataNode.pm"
+ "test/perl/TimescaleNode.pm"))))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:imported-modules `((guix build union)
+ ,@%cmake-build-system-modules)
+ #:modules `(,@%cmake-build-system-modules
+ (guix build union)
+ (ice-9 match))
+ #:configure-flags #~(list "-DAPACHE_ONLY=ON"
+ "-DSEND_TELEMETRY_DEFAULT=OFF")
+ #:test-target "regresschecklocal"
+ #:phases
+ #~(modify-phases (@ (guix build cmake-build-system) %standard-phases)
+ (add-after 'unpack 'patch-install-location
+ (lambda _
+ ;; Install extension to the output instead of the
+ ;; PostgreSQL store directory.
+ (substitute* '("CMakeLists.txt"
+ "cmake/GenerateScripts.cmake"
+ "sql/CMakeLists.txt")
+ (("\\$\\{PG_SHAREDIR\\}/extension")
+ (string-append #$output "/share/extension")))
+ ;; Likewise for the library.
+ (substitute* '("src/CMakeLists.txt"
+ "src/loader/CMakeLists.txt")
+ (("\\$\\{PG_PKGLIBDIR\\}")
+ (string-append #$output "/lib")))))
+ ;; Run the tests after install to make it easier to create the
+ ;; required PostgreSQL+TimescaleDB filesystem union.
+ (delete 'check)
+ (add-after 'install 'prepare-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((pg-data (string-append (getcwd) "/../pg-data"))
+ (pg-union (string-append (getcwd) "/../pg-union")))
+ (match inputs
+ (((names . directories) ...)
+ (union-build pg-union (cons #$output directories))))
+ (setenv "PATH" (string-append pg-union "/bin:"
+ (getenv "PATH")))
+ (invoke "initdb" "-D" pg-data)
+ (copy-file "test/postgresql.conf"
+ (string-append pg-data "/postgresql.conf"))
+ (invoke "pg_ctl" "-D" pg-data
+ "-o" (string-append "-k " pg-data)
+ "-l" (string-append pg-data "/db.log")
+ "start"))))
+ (add-after 'prepare-tests 'check
+ (assoc-ref %standard-phases 'check)))))
+ (inputs (list openssl postgresql))
+ (home-page "https://www.timescale.com/")
+ (synopsis "Time-series extension for PostgreSQL")
+ (description
+ "TimescaleDB is an database designed to make SQL scalable for
+time-series data. It is engineered up from PostgreSQL and packaged as a
+PostgreSQL extension, providing automatic partitioning across time and space
+(partitioning key), as well as full SQL support.")
+ (license license:asl2.0)))
+
(define-public pgloader
(package
(name "pgloader")
ages/sdl.scm, gnu/packages/skribilo.scm, gnu/packages/ssh.scm, gnu/packages/stalonetray.scm, gnu/packages/tcl.scm, gnu/packages/tcsh.scm, gnu/packages/telephony.scm, gnu/packages/texlive.scm, gnu/packages/tor.scm, gnu/packages/valgrind.scm, gnu/packages/version-control.scm, gnu/packages/vim.scm, gnu/packages/vpn.scm, gnu/packages/w3m.scm, gnu/packages/web.scm, gnu/packages/wordnet.scm, gnu/packages/xiph.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/packages/zile.scm, gnu/packages/zip.scm, gnu/packages/zsh.scm [synopsis, description]: Adjust according to lint checkers. * gnu/packages/fltk.scm (fltk)[source]: Wrap long line in uri. * /gnu/packages/xiph.scm (libogg, libtheora, vorbis-tools)[source]: Same. Eric Bavier 2014-08-23gnu: Rely on 'file' implicit input and 'patch-usr-bin-file'....* gnu/packages/admin.scm (sudo): * gnu/packages/gawk.scm (gawk): Remove workaround on MIPS. * gnu/packages/mcrypt.scm (mcrypt, libmhash): * gnu/packages/file.scm (file): Remove 'file' from native-inputs. * gnu/packages/mc.scm (mc): * gnu/packages/pretty-print.scm (a2ps, trueprint, source-highlight): * gnu/packages/image.scm (libtiff): Remove 'file' from native-inputs. Remove 'patch-configure' phase. Mark H Weaver 2014-04-06gnu: Synchronize synopses and descriptions with the Womb....* gnu/packages/gnunet.scm (gnunet): Synchronize description and synopsis with upstream. * gnu/packages/maths.scm (units): Likewise. * gnu/packages/grub.scm (grub): Likewise. * gnu/packages/pretty-print.scm (enscript): Likewise. Ludovic Courtès 2014-03-31gnu: Remove unused lambda arguments and prefer separate phases over...augmented phases. * gnu/packages/compression.scm (sharutils) [arguments]: Remove unused lambda args. * gnu/packages/gl.scm (mesa) [arguments]: Same * gnu/packages/fltk.scm [arguments]: Same. Substitute const check phase with #:tests? #f. Add pre-configure phase. * gnu/packages/ghostscript.scm (ghostscript) [arguments]: Put makefile patches in separate phase. Put so steps oinseparate phases. * gnu/packages/glib.scm (gobject-introspection) [arguments]: Remove unused lambda args. Put patches in pre-configure phase. * gnu/packages/gnupg.scm (gnupg) [arguments]: Put patch in pre-configure phase. (pius) [arguments]: Delete const #t configure and build phases. (signing-party) [arguments]: Factor patches into post-unpack phase. (paperkey) [arguments]: Remove unused lambda args. Factor out patches into pre-check phase. * gnu/packages/icu4c.scm [arguments]: Change source dir after standard unpack phase. Factor configure patches into pre-configure phase. * gnu/packages/lsof.scm [arguments]: Remove unused lambda args. Remove unnecessary apply. * gnu/packages/lvm.scm (lvm2) [arguments]: Factor out patches into pre-configure phase. * gnu/packages/libtiff.scm [arguments]: Same * gnu/packages/maths.scm (hdf5) [arguments]: Same * gnu/packages/gtk.scm (gtk+-2) [arguments]: Same * gnu/packages/mp3.scm (libmad) [arguments]: Same (id3lib) [arguments]: Same * gnu/packages/python.scm (python-2) [arguments]: Same * gnu/packages/texlive.scm (texlive) [arguments]: Same * gnu/packages/pretty-print.scm (a2ps) [arguments]: Same (trueprint) [arguments]: Same (source-highlight) [arguments]: Same. Remove unused lambda args. * gnu/packages/netpbm.scm [arguments]: Remove unused lambda args. Factor out test patches into pre-check phase. Condense calls to substitute* * gnu/packages/openldap.scm [arguments]: Factor out libtool copy into post-configure phases. [synopsis] Remove package name. * gnu/packages/ssh.scm (openssh) [arguments]: Factor out patches into separate phases. * gnu/packages/tcsh.scm [arguments]: Factor out test patches into pre-check phase. * gnu/packages/version-control.scm (git) [arguments]: Factor out patches into post-configure phase. * gnu/packages/vim.scm [arguments]: Same. [synopsis] Remove package name. * gnu/packages/vpn.scm (openconnect) [arguments]: Put configure flags in #:configure-flags Eric Bavier 2014-03-10gnu: pretty-print: Fix boost reference...* gnu/packages/pretty-print.scm (source-highlight): Change "boost-1.54" input to "boost" Eric Bavier 2014-03-07gnu: Add a2ps, trueprint, enscript, and source-highlight...* gnu/packages/pretty-print.scm: New file * gnu/packages/patches/source-highlight-regexrange-test.patch: New file * gnu-system.am (dist_patch_DATA): Add patch. (GNU_SYSTEM_MODULES): Add pretty-print.scm Eric Bavier