[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55903] [PATCH v10 02/41] gnu: Add go-github-com-creack-pty.
From: |
( |
Subject: |
[bug#55903] [PATCH v10 02/41] gnu: Add go-github-com-creack-pty. |
Date: |
Mon, 12 Sep 2022 19:43:01 +0100 |
From: "(unmatched-parenthesis" <paren@disroot.org>
* gnu/packages/golang.scm (go-github-com-creack-pty): New variable.
* guix/build-system/go.scm (go-target): Add to exported variables.
---
gnu/packages/golang.scm | 47 ++++++++++++++++++++++++++++++++++++++++
guix/build-system/go.scm | 1 +
2 files changed, 48 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 0179122c34..b0c9314022 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -10044,3 +10044,50 @@ (define-public go-github-com-zenhack-go-notmuch
"The notmuch package provides a Go language binding to the notmuch
email library.")
(license license:gpl3+)))
+
+(define-public go-github-com-creack-pty
+ (package
+ (name "go-github-com-creack-pty")
+ (version "1.1.18")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/creack/pty")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1qqhcgfym0napz8damj7dhfw28g2qn2f5h3lr93i0sxawq926yzc"))))
+ (build-system go-build-system)
+ (arguments
+ (list #:import-path "github.com/creack/pty"
+ #:modules '((ice-9 popen)
+ (ice-9 textual-ports)
+ (guix build go-build-system)
+ (guix build utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'regenerate-types
+ (lambda* (#:key import-path #:allow-other-keys)
+ ;; Generated files are included (ztypes_*). We need to
remake
+ ;; them with Cgo.
+ (with-directory-excursion (string-append "src/" import-path)
+ (let* ((go-arch
+ #$(car (go-target
+ (or (%current-target-system)
+ (nix-system->gnu-triplet
(%current-system))))))
+ (file (string-append "ztypes_" go-arch ".go"))
+ (pipe (open-input-pipe "go tool cgo -godefs
types.go"))
+ (text (get-string-all pipe)))
+ (close-pipe pipe)
+ (for-each delete-file
+ (find-files (getcwd) (file-name-predicate
+ "ztypes_[a-zA-Z0-9_]+.go")))
+ (call-with-output-file file
+ (lambda (port)
+ (display text port))))))))))
+ (home-page "https://github.com/creack/pty")
+ (synopsis "Pseudoterminal handling in Go")
+ (description
+ "The pty package provides functions for working with Unix
pseudoterminals.")
+ (license license:expat)))
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 5e0e5bbad3..9e5f972c84 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -38,6 +38,7 @@ (define-module (guix build-system go)
go-build-system
go-pseudo-version?
+ go-target
go-version->git-ref))
;; Commentary:
--
2.37.3
- [bug#55903] [PATCH v10 19/41] gnu: Add go-github-com-emersion-go-message., (continued)
- [bug#55903] [PATCH v10 19/41] gnu: Add go-github-com-emersion-go-message., (, 2022/09/12
- [bug#55903] [PATCH v10 24/41] gnu: Add go-github-com-emersion-go-pgpmail., (, 2022/09/12
- [bug#55903] [PATCH v10 20/41] gnu: go-github-com-emersion-go-sasl: Update to 0b9dcfb., (, 2022/09/12
- [bug#55903] [PATCH v10 08/41] gnu: Add go-github-com-go-ini-ini., (, 2022/09/12
- [bug#55903] [PATCH v10 14/41] gnu: Add go-github-com-go-test-deep., (, 2022/09/12
- [bug#55903] [PATCH v10 18/41] gnu: Add go-github-com-emersion-go-textwrapper., (, 2022/09/12
- [bug#55903] [PATCH v10 25/41] gnu: Add go-github-com-emersion-go-smtp., (, 2022/09/12
- [bug#55903] [PATCH v10 11/41] gnu: Add go-github-com-ssor-bom., (, 2022/09/12
- [bug#55903] [PATCH v10 26/41] gnu: Add go-github-com-niemeyer-pretty., (, 2022/09/12
- [bug#55903] [PATCH v10 23/41] gnu: Add go-github-com-protonmail-go-crypto., (, 2022/09/12
- [bug#55903] [PATCH v10 02/41] gnu: Add go-github-com-creack-pty.,
( <=
- [bug#55903] [PATCH v10 15/41] gnu: Add go-github-com-cention-sany-utf7., (, 2022/09/12
- [bug#55903] [PATCH v10 29/41] gnu: Add go-github-com-lithammer-fuzzysearch., (, 2022/09/12
- [bug#55903] [PATCH v10 30/41] gnu: Add go-github-com-google-shlex., (, 2022/09/12
- [bug#55903] [PATCH v10 27/41] gnu: Add go-github-com-arran4-golang-ical., (, 2022/09/12
- [bug#55903] [PATCH v10 38/41] gnu: Add go-github-com-onsi-ginkgo., (, 2022/09/12
- [bug#55903] [PATCH v10 32/41] gnu: Add go-github-com-emersion-go-milter., (, 2022/09/12
- [bug#55903] [PATCH v10 34/41] gnu: Add go-github-com-onsi-gomega., (, 2022/09/12
- [bug#55903] [PATCH v10 37/41] gnu: Add go-github-com-go-task-slim-sprig., (, 2022/09/12
- [bug#55903] [PATCH v10 28/41] gnu: Add go-git-sr-ht--sircmpwn-getopt., (, 2022/09/12
- [bug#55903] [PATCH v10 31/41] gnu: Add go-github-com-emersion-go-maildir., (, 2022/09/12