From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YBfWOSFl6mJAfQAAbAwnHQ (envelope-from ) for ; Wed, 03 Aug 2022 14:08:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SEC7OSFl6mL5QwAAauVa8A (envelope-from ) for ; Wed, 03 Aug 2022 14:08:01 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8019123627 for ; Wed, 3 Aug 2022 14:08:01 +0200 (CEST) Received: from localhost ([::1]:33918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oJDAO-0008AF-91 for larch@yhetil.org; Wed, 03 Aug 2022 08:08:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58502) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJD9X-00087c-Dx for guix-patches@gnu.org; Wed, 03 Aug 2022 08:07:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56694) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oJD9X-0003B9-4H for guix-patches@gnu.org; Wed, 03 Aug 2022 08:07:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oJD9X-00035b-0d for guix-patches@gnu.org; Wed, 03 Aug 2022 08:07:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56914] [PATCH 02/41] gnu: Add go-github-com-creack-pty. Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Aug 2022 12:07:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56914 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56914@debbugs.gnu.org Cc: "\(unmatched-parenthesis" X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165952839211388 (code B ref -1); Wed, 03 Aug 2022 12:07:06 +0000 Received: (at submit) by debbugs.gnu.org; 3 Aug 2022 12:06:32 +0000 Received: from localhost ([127.0.0.1]:46351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJD8x-0002xX-Nr for submit@debbugs.gnu.org; Wed, 03 Aug 2022 08:06:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:49174) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oJD8q-0002vt-HO for submit@debbugs.gnu.org; Wed, 03 Aug 2022 08:06:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57836) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJD8q-0007p6-CL for guix-patches@gnu.org; Wed, 03 Aug 2022 08:06:24 -0400 Received: from knopi.disroot.org ([178.21.23.139]:44430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oJD8n-0002yx-R1 for guix-patches@gnu.org; Wed, 03 Aug 2022 08:06:24 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id A3E3B40F38; Wed, 3 Aug 2022 14:06:20 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id qNtVnZvawr94; Wed, 3 Aug 2022 14:06:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1659528285; bh=paC15r+vccyZeKIKe7mCIvYyLjnsjYVD+VeozWpRtPQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZYHXuUlZdg0xsDyVtpZHnIwKSKHmimk/q7GDeP1IgvQAcN7PqE2IfkhZBvtDrjDcv tAEiVBTqI0wJiR0y4LLNdiajSd2pZoEVSUZmBDu5D6D+76gy7C//RespN267yUMcVE tPMUuTTTka0fV/F0wE3dciOl9AqutKHSx/MNI6vUIJgauTs5NOlTTJkapy7B7gnDF7 F7L1ytR8nj2vrfkuXKeSRM0GAWTq/8iFejzcl/ErZJEmlSgfwVucE/u1lj/oqD2qwM dzjeytiRC+7U4+3fSwJBJy/m27Uq1Yw1ipll5p1CJh9Oaj2XwrOCVcRCS3OHS5kL5o fTqf3xa9JD7DA== Date: Wed, 3 Aug 2022 13:04:00 +0100 Message-Id: <20220803120439.5108-2-paren@disroot.org> In-Reply-To: <20220803120439.5108-1-paren@disroot.org> References: <20220803120439.5108-1-paren@disroot.org> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=178.21.23.139; envelope-from=paren@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" From: "\( via Guix-patches" via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659528481; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=F/RnkiPuXLgnGnQPSz78OIkoBuUBAlvvqDCuh0Rp5vM=; b=BK6N6ztW3vAu7Ti3IyvCuxFcbsBpIZXErswy39yV/euaysBW9+MMh0RdbwbCNutg44kSIu C7iUpZ72I4+sEUnEY5lXhsPEt8njhs33wI38dKpZgEyWrcYGTk3CCaDIYKKZFMPrBBtUnk 3UmxzPhQK+5wOwr9cMAIq9T7T3VlbLk38PBe/nf+03SlipZagiJ5HRp2gm0rX0TImwmge/ 7i4ljZJ24zwX6pZON8ETfD5oPPSyXLqhn2EOF0waf2T9cffqG6OPorQSgORg2PQxtiuifY olhMAyfNwjTK0mBZbeikcTK6wI2aqbr1ReTIll38kIFCkoz9BEu20XLSYxgTRw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659528481; a=rsa-sha256; cv=none; b=RKOIReCkGx2toHArkEQ94mVaZH2fr8JnUe9dRz5ZkwwLsKzUgeY3pc1Bk3iT+4UfxWsLmk XlYaYjlNfsEuUTqROJ5bTn2eGCgUJNdlFMNOeOM4Ca/dBIUkXCtiSlt83J9IkIR4gidzkY 7l4ofX90erOIZb0kUO6Ylk1FowIqWRv2KyDpQGhD0/x/PuhH4OV7t1w/5hSfmtWV9P/uIT bi0P1rY92npGDnOZVflfcuxdP8wJZMZq0FFXutW+b6Jt0eUUNOk3zVwMMedsp8McMx7ZLE SjuLr7bQ+WD4YkogcCgAXkvo8C2xnvkn6m0B28I2JvGZJ4/rqBDPYAvBcTVTvg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=ZYHXuUlZ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.01 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=ZYHXuUlZ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8019123627 X-Spam-Score: -4.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: T++dMkhSrBW+ From: "(unmatched-parenthesis" * 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 | 48 ++++++++++++++++++++++++++++++++++++++++ guix/build-system/go.scm | 1 + 2 files changed, 49 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index 2842c7f481..ed6632a20d 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -58,6 +58,7 @@ (define-module (gnu packages golang) #:use-module (guix memoization) #:use-module ((guix build utils) #:select (alist-replace)) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix build-system gnu) @@ -9939,3 +9940,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.1