From b4bbc0c055e5460afdd207cd726260d6601e0799 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Fri, 13 Dec 2024 17:00:05 +0000 Subject: [PATCH] gnu: Add go-github-com-jackc-pgx. * gnu/packages/golang-xyz.scm (go-github-com-jackc-pgx): New variable. Change-Id: I9877c3e8012e2042e341f4f93888967f14f82887 --- gnu/packages/golang-xyz.scm | 54 +++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm index 6f203f21d42690327f8647c101fe578d669245d5..7aeef6756594ace3190721b705f2f6df82c5b1b1 100644 --- a/gnu/packages/golang-xyz.scm +++ b/gnu/packages/golang-xyz.scm @@ -5030,6 +5030,60 @@ wire protocol version 3.") files (e.g. .pg_service.conf).") (license license:expat))) +(define-public go-github-com-jackc-pgx + (package + (name "go-github-com-jackc-pgx") + (version "3.6.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/jackc/pgx") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0hbnh69ss0pq83n18b62znj3qi54y9kr31a3xi9h35p27nsk3izf")))) + (build-system go-build-system) + (arguments + (list + #:import-path "github.com/jackc/pgx" + #:test-subdirs + #~(list ;; "pgtype/..." ; most tests require networking setup + ;; "stdlib" + ;; "." ; github.com/jackc/pgx [build failed] + "chunkreader" + "internal/sanitize" + "log/..." + "pgio" + "pgproto3") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'remove-examples-and-benchmarks + (lambda* (#:key tests? import-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" import-path) + (delete-file-recursively "examples"))))))) + (native-inputs + (list go-github-com-cockroachdb-apd + go-github-com-jackc-fake)) + (propagated-inputs + (list go-github-com-gofrs-uuid + go-github-com-lib-pq + go-github-com-rs-zerolog + go-github-com-satori-go-uuid + go-github-com-shopspring-decimal + go-github-com-sirupsen-logrus + go-go-uber-org-zap)) + (home-page "https://github.com/jackc/pgx") + (synopsis "PostgreSQL driver and toolkit for Golang") + (description + "This package implements a pure Go driver and toolkit for PostgreSQL. It +is different from other drivers such as +@url{http://godoc.org/github.com/lib/pq,pq} because, while it can operate as a +database/sql compatible driver, pgx is also usable directly. It offers a +native interface similar to database/sql that offers better performance and +more features.") + (license license:expat))) + (define-public go-github-com-jackc-puddle (package (name "go-github-com-jackc-puddle")