From 9183b8142b43082fee55a2730399243dea47ad0a Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Sat, 1 Jan 2022 14:48:07 +0800 Subject: gnu: Add sqlitebrowser. * gnu/packages/databases.scm (sqlitebrowser): New variable. Signed-off-by: Efraim Flashner --- gnu/packages/databases.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 128b349cae..22224178ed 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -55,6 +55,7 @@ ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 jgart ;;; Copyright © 2021 Foo Chuan Wei +;;; Copyright © 2022 Zhu Zihao ;;; ;;; This file is part of GNU Guix. ;;; @@ -132,6 +133,7 @@ #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages qt) #:use-module (gnu packages rdf) #:use-module (gnu packages readline) #:use-module (gnu packages regex) @@ -164,6 +166,7 @@ #:use-module (guix build-system meson) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (guix build-system qt) #:use-module (guix build-system ruby) #:use-module (guix build-system cmake) #:use-module (guix build-system scons) @@ -4319,3 +4322,36 @@ a handy text editor with language recognition, and visualize SELECT results in a Gtk.Grid Widget.") (home-page "https://github.com/Alecaddd/sequeler") (license license:gpl2+))) + +(define-public sqlitebrowser + (package + (name "sqlitebrowser") + (version "3.12.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sqlitebrowser/sqlitebrowser") + (commit (string-append "v" version)))) + (sha256 + (base32 "1ljqzcx388mmni8lv9jz5r58alhsjrrqi4nzjnbfki94rn4ray6z")) + (file-name (git-file-name name version)))) + (build-system qt-build-system) + (arguments + (list #:tests? #f ; no tests + #:configure-flags + ;; TODO: Unbundle QHexEdit, QScintilla. + #~(list "-DFORCE_INTERNAL_QCUSTOMPLOT=OFF"))) + (inputs + (list qcustomplot + qtbase-5 + sqlite)) + (native-inputs (list qttools)) + (home-page "https://sqlitebrowser.org/") + (synopsis "Database browser for SQLite") + (description "Sqlitebrowser is a high quaility, visual, open source tool to +create design, and edit database file compatible with SQLite.") + (license + ;; dual license + (list license:gpl3+ + license:mpl2.0)))) -- cgit 1.4.1 From 1898b8386b6a5f235b716c6fb7c34775bda88861 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 26 Jan 2022 13:28:39 +0200 Subject: gnu: sqlitebrowser: Unbundle qscintilla. * gnu/packages/databases.scm (sqlitebrowser)[source]: Add snippet. [arguments]: Add configure-flag to find qscintilla include directory. [inputs]: Add qscintilla. --- gnu/packages/databases.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 22224178ed..1bdee6092b 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -4333,17 +4333,26 @@ a Gtk.Grid Widget.") (uri (git-reference (url "https://github.com/sqlitebrowser/sqlitebrowser") (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 "1ljqzcx388mmni8lv9jz5r58alhsjrrqi4nzjnbfki94rn4ray6z")) - (file-name (git-file-name name version)))) + (modules '((guix build utils))) + (snippet + '(begin + (delete-file-recursively "libs/qcustomplot-source/") + (delete-file-recursively "libs/qscintilla"))))) (build-system qt-build-system) (arguments (list #:tests? #f ; no tests #:configure-flags - ;; TODO: Unbundle QHexEdit, QScintilla. - #~(list "-DFORCE_INTERNAL_QCUSTOMPLOT=OFF"))) + ;; TODO: Unbundle QHexEdit. + #~(list (string-append "-DQSCINTILLA_INCLUDE_DIR=" + #$(this-package-input "qscintilla") + "/include/Qsci") + "-DFORCE_INTERNAL_QCUSTOMPLOT=OFF"))) (inputs (list qcustomplot + qscintilla qtbase-5 sqlite)) (native-inputs (list qttools)) -- cgit 1.4.1 From 3d8ee86ace82f37ebbfea0e303468284538ba52f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 26 Jan 2022 13:32:40 +0200 Subject: gnu: sqlitebrowser: Enable tests. * gnu/packages/databases.scm (sqlitebrowser)[arguments]: Don't skip tests. Add configure-flag to enable tests. --- gnu/packages/databases.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 1bdee6092b..064d8c77e0 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -4343,13 +4343,13 @@ a Gtk.Grid Widget.") (delete-file-recursively "libs/qscintilla"))))) (build-system qt-build-system) (arguments - (list #:tests? #f ; no tests - #:configure-flags + (list #:configure-flags ;; TODO: Unbundle QHexEdit. #~(list (string-append "-DQSCINTILLA_INCLUDE_DIR=" #$(this-package-input "qscintilla") "/include/Qsci") - "-DFORCE_INTERNAL_QCUSTOMPLOT=OFF"))) + "-DFORCE_INTERNAL_QCUSTOMPLOT=OFF" + "-DENABLE_TESTING=ON"))) (inputs (list qcustomplot qscintilla -- cgit 1.4.1 From c5908b5c8093265e720e825f39ed3e5f69ade723 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 Jan 2022 15:33:39 +0200 Subject: gnu: Add go-github-com-bradfitz-gomemcache. * gnu/packages/databases.scm (go-github-com-bradfitz-gomemcache): New variable. --- gnu/packages/databases.scm | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 064d8c77e0..ab9180bbc4 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2015 Eric Dvorsak ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2016 Christine Lemmer-Webber -;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016, 2017, 2018 Roel Janssen ;;; Copyright © 2016 David Craven @@ -632,6 +632,36 @@ around TangentOrg’s libmemcached library, and can be used as a drop-in replacement for the code@{python-memcached} library.") (license license:bsd-3))) +(define-public go-github-com-bradfitz-gomemcache + (package + (name "go-github-com-bradfitz-gomemcache") + (version "0.0.0-20190913173617-a41fca850d0b") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/bradfitz/gomemcache") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "18qpds6xr73jy80pj7l3pc1l1ndcy3va2dl8fzk17bgwg49sxwfz")) + (modules '((guix build utils))) + (snippet + '(begin + ;; Fixes the 'untyped-int -> string of one rune' issue. + ;; https://github.com/golang/go/issues/32479 + (substitute* "memcache/memcache_test.go" + (("string\\(0x7f") "string(rune(0x7f)")))))) + (build-system go-build-system) + (arguments + '(#:unpack-path "github.com/bradfitz/gomemcache" + #:import-path "github.com/bradfitz/gomemcache/memcache")) + (home-page "https://github.com/bradfitz/gomemcache") + (synopsis "Memcache client library in Go") + (description + "This is a memcache client library for the Go programming language.") + (license license:asl2.0))) + (define-public litecli (package (name "litecli") -- cgit 1.4.1 From 0045abb5bb369d302e1f9eed26dc556936bae9c5 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 Jan 2022 15:43:44 +0200 Subject: gnu: Add go-github-com-couchbase-gomemcached. * gnu/packages/databases.scm (go-github-com-couchbase-gomemcached): New variable. --- gnu/packages/databases.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index ab9180bbc4..49840c23fd 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -662,6 +662,29 @@ replacement for the code@{python-memcached} library.") "This is a memcache client library for the Go programming language.") (license license:asl2.0))) +(define-public go-github-com-couchbase-gomemcached + (package + (name "go-github-com-couchbase-gomemcached") + (version "0.1.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/couchbase/gomemcached") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "10w74gc05x5naspls39sv2r92krrg31mk266w3lyqqwc0s3fxysl")))) + (build-system go-build-system) + (arguments '(#:import-path "github.com/couchbase/gomemcached")) + (native-inputs + (list go-github-com-stretchr-testify)) + (home-page "https://github.com/couchbase/gomemcached") + (synopsis "Memcached binary protocol toolkit for go") + (description + "This package provides memcache client and server functionality.") + (license license:expat))) + (define-public litecli (package (name "litecli") -- cgit 1.4.1 From 87c4a15da02abb9feb7d4d8cef80ff2bf20454f1 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 Jan 2022 15:51:44 +0200 Subject: gnu: Add go-github-com-cupcake-rdb. * gnu/packages/databases.scm (go-github-com-cupcake-rdb): New variable. --- gnu/packages/databases.scm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 49840c23fd..9bc15e71b2 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -2377,6 +2377,29 @@ one-to-one, while still providing an idiomatic interface.") (home-page "https://github.com/redis/redis-rb") (license license:expat))) +(define-public go-github-com-cupcake-rdb + (package + (name "go-github-com-cupcake-rdb") + (version "0.0.0-20161107195141-43ba34106c76") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tent/rdb") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1l4bsn5yj8r875crz1rsk6dlvhv0bd8mgazsch5vl4c19v0fs2ib")))) + (build-system go-build-system) + (arguments '(#:import-path "github.com/cupcake/rdb")) + (native-inputs + (list go-gopkg-in-check-v1)) + (home-page "https://github.com/tent/rdb") + (synopsis "Redis RDB parser for Go") + (description + "Package rdb implements parsing and encoding of the Redis RDB file format.") + (license license:expat))) + (define-public kyotocabinet (package (name "kyotocabinet") -- cgit 1.4.1 From 9cca298265b4c568892382d3e4740cdc7376c9f2 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 Jan 2022 16:31:36 +0200 Subject: gnu: Add go-github-com-gomodule-redigo. * gnu/packages/databases.scm (go-github-com-gomodule-redigo): New variable. --- gnu/packages/databases.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 9bc15e71b2..2588cfa7be 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -2400,6 +2400,32 @@ one-to-one, while still providing an idiomatic interface.") "Package rdb implements parsing and encoding of the Redis RDB file format.") (license license:expat))) +(define-public go-github-com-gomodule-redigo + (package + (name "go-github-com-gomodule-redigo") + (version "1.8.8") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/gomodule/redigo") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0wplaaxg7f6c6c08gdp33l48hygn8gq1rhlnjzr1c9qcggsm07k1")))) + (build-system go-build-system) + (arguments + '(#:unpack-path "github.com/gomodule/redigo" + #:import-path "github.com/gomodule/redigo/redis")) + (native-inputs + (list go-github-com-stretchr-testify + redis)) + (home-page "https://github.com/gomodule/redigo") + (synopsis "Go client for Redis") + (description + "Redigo is a Go client for the Redis database.") + (license license:asl2.0))) + (define-public kyotocabinet (package (name "kyotocabinet") -- cgit 1.4.1 From 5bac1466292e0f8d845665e72834ec67eda88951 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 Jan 2022 16:35:37 +0200 Subject: gnu: Add go-gopkg-in-mgo-v2. * gnu/packages/databases.scm (go-gopkg-in-mgo-v2): New variable. --- gnu/packages/databases.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 2588cfa7be..aa1711c911 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -3022,6 +3022,30 @@ etc., and an SQL engine for performing simple SQL queries.") (license (list license:lgpl2.0 license:gpl2+)))) +(define-public go-gopkg-in-mgo-v2 + (package + (name "go-gopkg-in-mgo-v2") + (version "2.0.0-20190816093944-a6b53ec6cb22") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gopkg.in/mgo.v2") + (commit (go-version->git-ref version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lgvwxsbmdrf4938qkxl56wbwgbphk2qqnmpf73qdmlv4qsg14na")))) + (build-system go-build-system) + (arguments + '(#:tests? #f ; Tests try to use a running mongodb server. + #:import-path "gopkg.in/mgo.v2")) + (native-inputs + (list go-gopkg-in-check-v1)) + (home-page "https://gopkg.in/mgo.v2") + (synopsis "MongoDB driver for Go") + (description "This package provides a MongoDB driver for Go.") + (license license:bsd-2))) + (define-public python-lmdb (package (name "python-lmdb") -- cgit 1.4.1 From 76656a23bf69216cf3ca4af8f09dd9ba82c75ffb Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 18 Jan 2022 16:42:21 +0200 Subject: gnu: Add go-go-etcd-io-bbolt. * gnu/packages/databases.scm (go-go-etcd-io-bbolt): New variable. --- gnu/packages/databases.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/databases.scm') diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index aa1711c911..cfa1743d75 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -2715,6 +2715,34 @@ on another machine, accessed via TCP/IP.") (home-page "http://pqxx.org/") (license license:bsd-3))) +(define-public go-go-etcd-io-bbolt + (package + (name "go-go-etcd-io-bbolt") + (version "1.3.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/etcd-io/bbolt") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0pj5245d417za41j6p09fmkbv05797vykr1bi9a6rnwddh1dbs8d")))) + (build-system go-build-system) + (arguments + `(#:import-path "go.etcd.io/bbolt" + ;; Extending the test timeout to 30 minutes still times out on aarch64. + #:tests? ,(not target-arm?))) + (propagated-inputs + (list go-golang-org-x-sys)) + (home-page "https://go.etcd.io/bbolt") + (synopsis "Embedded key/value database for Go") + (description "Bolt is a pure Go key/value store inspired by Howard Chu's +LMDB project. The goal of the project is to provide a simple, fast, and +reliable database for projects that don't require a full database server such as +Postgres or MySQL.") + (license license:expat))) + (define-public python-peewee (package (name "python-peewee") -- cgit 1.4.1 From 81873cbc5d42b2d404ae01fb3e64e946f21f4004 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 28 Jan 2022 22:57:27 +0100 Subject: gnu: Add TimescaleDB. * gnu/packages/databases.scm (timescaledb): New variable. --- gnu/packages/databases.scm | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) (limited to 'gnu/packages/databases.scm') 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") -- cgit 1.4.1