GNU bug report logs - #41751
[PATCH] gnu: Add bats.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Oleg Pykhalov <go.wigust@HIDDEN>; Keywords: patch; dated Sun, 7 Jun 2020 18:25:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Jun 2020 18:24:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 07 14:24:22 2020
Received: from localhost ([127.0.0.1]:54854 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jhzxo-0005H2-2y
	for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 14:24:22 -0400
Received: from lists.gnu.org ([209.51.188.17]:37822)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <go.wigust@HIDDEN>) id 1jhzxm-0005Gv-0V
 for submit <at> debbugs.gnu.org; Sun, 07 Jun 2020 14:24:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52824)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <go.wigust@HIDDEN>)
 id 1jhzxl-0005k0-Qm
 for guix-patches@HIDDEN; Sun, 07 Jun 2020 14:24:05 -0400
Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:35167)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <go.wigust@HIDDEN>)
 id 1jhzxk-0007Pk-KA
 for guix-patches@HIDDEN; Sun, 07 Jun 2020 14:24:05 -0400
Received: by mail-lj1-x22b.google.com with SMTP id j18so4644976lji.2
 for <guix-patches@HIDDEN>; Sun, 07 Jun 2020 11:24:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=UD5JFZRFE5Q4zGYR6/2etVJA/Pn2ZClRGVwo1lhh6KQ=;
 b=fXedPq0RbBUNxC/4RHaa1eaHLIzKaRSbJWPhD3E2qTHRhw+sD0KN4X3FUqcBPVIigp
 YbljUZ+XVvCC1FFD3zb4uyiY9/Hh2KOVnNty2/YH0OttvzFBGb/DVy384Elvt1BMZNSp
 JTYB8TPYKSMrM7EHpvf6X5mVF2tFG4GIejx3jvFstLLcyA2+LmkPZuham7efYvTvX0lO
 1L5+IMyh3HDRXnkUyig6EV8TtGNwwFIqRNMeKyzx5nwUsIwjruXKVd8y1gSNGciwwta8
 9EBc7b+xPFgIxMADiBN8RUvTvMbLDhfz6yidDuQAfdkbOYH5Y3bnXplDCcWSarVwJlq4
 o74Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version
 :content-transfer-encoding;
 bh=UD5JFZRFE5Q4zGYR6/2etVJA/Pn2ZClRGVwo1lhh6KQ=;
 b=CFGX/2BGJ+i0NpC2kMToyFaUZvfp7tsJ9K2tnMNPwD43A3OZ+5czmJyKqT8gv2pQuT
 +yDtrDjO94ZMVdFrjG7EDlzDhUr/lBABuYZEhIMwEgKUElSQZB1RrvQfonTinhExQ/eG
 mOS5V0xwF9TmJN/4EC4hFFMFioRqaSdXahgPaaL8xU/yPdmlqhMUlRQsAhwB1qtCGfoM
 MKdR6AmrVcINdS2RmfxBSQUabjcLQBgZJipnfwxPds0/Pm4jRhsXUSKdoP08viP4pf5e
 N4EVOJymQtbscqZxsMX+JQPefkjMyO0dC7fJYkjF/7/wGkN989c52ZZHtUmfjFS38MQe
 +Uhw==
X-Gm-Message-State: AOAM533uX1wG04cA9b7yJpxQmml+EaumShYB682zzPtwVh8zq9tTsXw9
 6sMcL2EIKge/uvQnRqGl7gX2rNR5
X-Google-Smtp-Source: ABdhPJzgj0BIR2ykXGaK5AnVoL2Y9IlUgh3SET6jnidFDWAY8sU/oXFxvY7SEUY7gF13pmJsZRpO4Q==
X-Received: by 2002:a2e:b804:: with SMTP id u4mr9424474ljo.228.1591554242133; 
 Sun, 07 Jun 2020 11:24:02 -0700 (PDT)
Received: from localhost.localdomain (92-100-136-169.dynamic.avangarddsl.ru.
 [92.100.136.169])
 by smtp.gmail.com with ESMTPSA id w20sm3147710lji.7.2020.06.07.11.24.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 07 Jun 2020 11:24:01 -0700 (PDT)
From: Oleg Pykhalov <go.wigust@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: Add bats.
Date: Sun,  7 Jun 2020 21:23:50 +0300
Message-Id: <20200607182350.32447-1-go.wigust@HIDDEN>
X-Mailer: git-send-email 2.26.2
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a00:1450:4864:20::22b;
 envelope-from=go.wigust@HIDDEN; helo=mail-lj1-x22b.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
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, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001,
 URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
Cc: Oleg Pykhalov <go.wigust@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

* gnu/packages/bash.scm (bats): New variable.
---
 gnu/packages/bash.scm | 52 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 3ba8a13e40..dff3fcb594 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@HIDDEN>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@HIDDEN>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@HIDDEN>
+;;; Copyright © 2020 Oleg Pykhalov <go.wigust@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -24,6 +25,7 @@
 (define-module (gnu packages bash)
   #:use-module (guix licenses)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages bootstrap)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages readline)
@@ -37,6 +39,7 @@
   #:use-module (guix monads)
   #:use-module (guix store)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system trivial)
   #:autoload   (guix gnupg) (gnupg-verify*)
   #:autoload   (guix base32) (bytevector->nix-base32-string)
 
@@ -362,3 +365,52 @@ for Bash shell scripts and functions.  Along with the Test::More-style testing
 helpers it provides helper functions for mocking commands and in-process output
 capturing.")
     (license expat)))
+
+(define-public bats
+  (package
+    (name "bats")
+    (version "1.2.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/bats-core/bats-core.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0f59zh4d4pa1a7ybs5zl6h0csbqqv11lbnq0jl1dgwm1s6p49bsq"))))
+    (inputs
+     `(("bash" ,bash)
+       ("coreutils" ,coreutils)
+       ("grep" ,grep)))
+    (arguments
+     `(#:modules ((guix build utils))
+       #:builder
+       (begin
+         (use-modules (guix build utils))
+         (copy-recursively (assoc-ref %build-inputs "source") ".")
+         (setenv "PATH"
+                 (string-append (assoc-ref %build-inputs "bash") "/bin"
+                                ":" (assoc-ref %build-inputs "coreutils") "/bin"
+                                ":" (assoc-ref %build-inputs "grep") "/bin"
+                                ":" (getenv "PATH")))
+         ;; Patch phase
+         (substitute* "install.sh"
+           (("/usr/bin/env bash") (which "bash")))
+         (substitute* "libexec/bats-core/bats"
+           (("type -p greadlink readlink")
+            (string-append "type -p " (which "readlink"))))
+         (substitute* "libexec/bats-core/bats"
+           (("grep") (which "grep")))
+         ;; Install phase
+         (invoke "./install.sh" %output))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "BATS_ROOT")
+            (separator #f) ;single entry
+            (files '("libexec/bats-core")))))
+    (build-system trivial-build-system)
+    (home-page "https://github.com/bats-core/bats-core/")
+    (synopsis "Bash Automated Testing System")
+    (description "This package provides a Bash Automated Testing System.")
+    (license expat)))
-- 
2.26.2





Acknowledgement sent to Oleg Pykhalov <go.wigust@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#41751; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 7 Jun 2020 18:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.