[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55903] [PATCH v12 01/40] gnu: Add go-github-com-zenhack-go-notmuch.
From: |
( |
Subject: |
[bug#55903] [PATCH v12 01/40] gnu: Add go-github-com-zenhack-go-notmuch. |
Date: |
Mon, 10 Oct 2022 08:17:15 +0100 |
From: "(unmatched-parenthesis" <paren@disroot.org>
* gnu/packages/golang.scm (notmuch-fixtures): New variable here...
(go-github-com-zenhack-go-notmuch): ...and here.
---
gnu/packages/golang.scm | 52 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 53d1e38c28..b7efffb2e9 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -36,6 +36,7 @@
;;; Copyright © 2022 Pier-Hugues Pellerin <phpellerin@gmail.com>
;;; Copyright © 2022 muradm <mail@muradm.net>
;;; Copyright © 2022 Dhruvin Gandhi <contact@dhruvin.dev>
+;;; Copyright © 2022 ( <paren@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -61,6 +62,7 @@ (define-module (gnu packages golang)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages)
+ #:use-module (guix gexp)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (guix build-system go)
@@ -73,6 +75,7 @@ (define-module (gnu packages golang)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages lua)
+ #:use-module (gnu packages mail)
#:use-module (gnu packages mp3)
#:use-module (gnu packages password-utils)
#:use-module (gnu packages pcre)
@@ -10177,6 +10180,55 @@ (define-public go-github-com-disintegration-imaging
(resize, rotate, crop, brightness/contrast adjustments, etc.).")
(license license:expat)))
+(define notmuch-fixtures
+ (origin
+ (method url-fetch)
+ (uri "http://notmuchmail.org/releases/test-databases/database-v1.tar.xz")
+ (sha256
+ (base32
+ "1lk91s00y4qy4pjh8638b5lfkgwyl282g1m27srsf7qfn58y16a2"))))
+
+(define-public go-github-com-zenhack-go-notmuch
+ (package
+ (name "go-github-com-zenhack-go-notmuch")
+ (version "0.0.0-20211022191430-4d57e8ad2a8b")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/zenhack/go.notmuch")
+ (commit (go-version->git-ref version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1j2s5smjf7pp7i72dw12sm9iz961y3cy8nkm7hmrg53f6wna57h9"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/zenhack/go.notmuch"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-notmuch-path
+ (lambda* (#:key inputs import-path #:allow-other-keys)
+ (substitute* (find-files (string-append
+ "src/" import-path)
+ "\\.go$")
+ (("// #cgo LDFLAGS:.*$")
+ (string-append
+ "// #cgo LDFLAGS: -lnotmuch "
+ "-L" #$(this-package-input "notmuch") "/lib\n"
+ "// #cgo CFLAGS: "
+ "-I" #$(this-package-input "notmuch") "/include\n")))))
+ (add-before 'check 'unpack-test-fixtures
+ (lambda* (#:key inputs import-path #:allow-other-keys)
+ (invoke "tar" "xf" #$notmuch-fixtures "-C"
+ (string-append "src/" import-path "/fixtures")))))))
+ (inputs (list notmuch))
+ (home-page "https://github.com/zenhack/go.notmuch")
+ (synopsis "Go bindings to libnotmuch")
+ (description
+ "The notmuch package provides a Go language binding to the notmuch
+email library.")
+ (license license:gpl3+)))
+
;;;
;;; Avoid adding new packages to the end of this file. To reduce the chances
;;; of a merge conflict, place them above by existing packages with similar
--
2.38.0
- [bug#55903] [PATCH v12 01/40] gnu: Add go-github-com-zenhack-go-notmuch.,
( <=
- [bug#55903] [PATCH v12 02/40] gnu: Add go-github-com-creack-pty., (, 2022/10/10
- [bug#55903] [PATCH v12 06/40] gnu: Add go-github-com-miolini-datacounter., (, 2022/10/10
- [bug#55903] [PATCH v12 03/40] gnu: Add go-google-golang-org-protobuf., (, 2022/10/10
- [bug#55903] [PATCH v12 23/40] gnu: Add go-github-com-protonmail-go-crypto., (, 2022/10/10
- [bug#55903] [PATCH v12 27/40] gnu: Add go-github-com-arran4-golang-ical., (, 2022/10/10
- [bug#55903] [PATCH v12 25/40] gnu: Add go-github-com-emersion-go-smtp., (, 2022/10/10
- [bug#55903] [PATCH v12 29/40] gnu: Add go-github-com-lithammer-fuzzysearch., (, 2022/10/10
- [bug#55903] [PATCH v12 19/40] gnu: Add go-github-com-emersion-go-message., (, 2022/10/10
- [bug#55903] [PATCH v12 28/40] gnu: Add go-git-sr-ht--sircmpwn-getopt., (, 2022/10/10
- [bug#55903] [PATCH v12 35/40] gnu: Add go-github-com-nxadm-tail., (, 2022/10/10