From unknown Sun Jun 22 11:42:20 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41751] [PATCH] gnu: Add bats. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Jun 2020 18:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41751 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41751@debbugs.gnu.org Cc: Oleg Pykhalov X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159155426220299 (code B ref -1); Sun, 07 Jun 2020 18:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jun 2020 18:24:22 +0000 Received: from localhost ([127.0.0.1]:54854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhzxo-0005H2-2y for submit@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 ) id 1jhzxm-0005Gv-0V for submit@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 ) id 1jhzxl-0005k0-Qm for guix-patches@gnu.org; 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 ) id 1jhzxk-0007Pk-KA for guix-patches@gnu.org; Sun, 07 Jun 2020 14:24:05 -0400 Received: by mail-lj1-x22b.google.com with SMTP id j18so4644976lji.2 for ; 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 Date: Sun, 7 Jun 2020 21:23:50 +0300 Message-Id: <20200607182350.32447-1-go.wigust@gmail.com> 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@gmail.com; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Mathieu Othacehe +;;; Copyright © 2020 Oleg Pykhalov ;;; ;;; 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 From unknown Sun Jun 22 11:42:20 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#41751] [PATCH] gnu: Add bats. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 14 Jun 2020 10:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41751 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov Cc: 41751@debbugs.gnu.org Received: via spool by 41751-submit@debbugs.gnu.org id=B41751.159212975421604 (code B ref 41751); Sun, 14 Jun 2020 10:16:02 +0000 Received: (at 41751) by debbugs.gnu.org; 14 Jun 2020 10:15:54 +0000 Received: from localhost ([127.0.0.1]:42909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkPg9-0005cN-Lv for submit@debbugs.gnu.org; Sun, 14 Jun 2020 06:15:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkPg7-0005c7-IF for 41751@debbugs.gnu.org; Sun, 14 Jun 2020 06:15:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42957) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkPg2-00027A-19; Sun, 14 Jun 2020 06:15:46 -0400 Received: from [2a01:e0a:fa:a50:d869:cbcf:2456:40cc] (port=36062 helo=meru) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jkPg1-0001wa-Jp; Sun, 14 Jun 2020 06:15:45 -0400 From: Mathieu Othacehe References: <20200607182350.32447-1-go.wigust@gmail.com> Date: Sun, 14 Jun 2020 12:15:44 +0200 In-Reply-To: <20200607182350.32447-1-go.wigust@gmail.com> (Oleg Pykhalov's message of "Sun, 7 Jun 2020 21:23:50 +0300") Message-ID: <87bllmkl67.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello Oleg, > + (native-search-paths > + (list (search-path-specification > + (variable "BATS_ROOT") > + (separator #f) ;single entry > + (files '("libexec/bats-core"))))) Why not patching "bats" script directly? This way we wouldn't need an extra environment variable to run "bats". > + (description "This package provides a Bash Automated Testing System.") It would be good to elaborate a bit on that, what can be tested exactly, how to use it. Otherwise, this looks fine. Thanks, Mathieu From unknown Sun Jun 22 11:42:20 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Oleg Pykhalov Subject: bug#41751: closed (Re: [bug#41751] [PATCH] gnu: Add bats.) Message-ID: References: <878sf7l84u.fsf@gmail.com> <20200607182350.32447-1-go.wigust@gmail.com> X-Gnu-PR-Message: they-closed 41751 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 41751@debbugs.gnu.org Date: Sat, 25 Jul 2020 19:15:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1595704502-3763-1" This is a multi-part message in MIME format... ------------=_1595704502-3763-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #41751: [PATCH] gnu: Add bats. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 41751@debbugs.gnu.org. --=20 41751: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D41751 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1595704502-3763-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 41751-done) by debbugs.gnu.org; 25 Jul 2020 19:14:37 +0000 Received: from localhost ([127.0.0.1]:51168 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzPcz-0000xy-2r for submit@debbugs.gnu.org; Sat, 25 Jul 2020 15:14:37 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:34884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzPcw-0000xl-LH for 41751-done@debbugs.gnu.org; Sat, 25 Jul 2020 15:14:35 -0400 Received: by mail-lj1-f196.google.com with SMTP id q4so13267759lji.2 for <41751-done@debbugs.gnu.org>; Sat, 25 Jul 2020 12:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=v59uwrmK6rem2SFdAK3slY+zjuxOEICrUhMIQKp6JAg=; b=CEiw9H2rc+D8pQopH03cxlnTjCeE3VWjS2q5n1N4xqfN+8ZVKs3pYFyESH2aKXE/Ii Tdw87jj8SD2wKSwKQy8sZXMacBh4xUQAsBbTWZ0pSvna41lsyTEbOmXTULNkmB9jd0EM 3FFpyn2TZFQeU2ZLqalUmnBr4qinL+r8L47krp38biGc9u56jAKAFiQMSrTX3jeK4d4Y V8a0cCba+6enyTqPhtbcvX8PUNGxJkDk9ZA7399QN0LYNXqXA5/x4jdcyNeJYF5pGEPw mt43ooeWvrfU5shrH7HgMqozci25TLk6TYfe27od2wdAAXMEtC+fz/MeiNpbYLZqTb4D cE3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=v59uwrmK6rem2SFdAK3slY+zjuxOEICrUhMIQKp6JAg=; b=EaVppbqrjpJMWmyMERF69pegyFeQjduQOZTEtn4lgjsHv429bbri4zkeGXlKR+vNOP P4KCp0omVcifB9zm7DjEF3BGW9lCb5VTiE6W0CUQso2JP6kkwQWerwPwQySAhatifnZe 1qPvA83bs86e9Ifq8UcGacmzALW7nfPKPI0EtBoiNsTiYXCCNLAtXGMquCNUliG+zk1A YUWqjQ7V5Y9Z/69eLDrN2p55lYK6Pp433TLJqdAWZBnrYx1pikafjX9D5yhPJwJ1uLsY WII9Q1CE2osaSZjBPf2iAi8PDv2z/8SOOccTL9/dlgZseLO3lPBG0Y1ETvhMPWuKWL3f eDzQ== X-Gm-Message-State: AOAM533OMHAyivCsvejEQ+s+PT+cofXySg49nLLK9nAbChMSe8Gs5pXX k4gXoB/CHsk3dvwUhWgXuQX7NYxE X-Google-Smtp-Source: ABdhPJwbrsCGIYt/TM0wwMSTDlM38OoIm/gARaR9QmvliViiSULbjV7H7Jol42202Yr8/t6HGbM7xg== X-Received: by 2002:a2e:90d8:: with SMTP id o24mr6910482ljg.278.1595704468701; Sat, 25 Jul 2020 12:14:28 -0700 (PDT) Received: from guixsd (ppp91-122-98-213.pppoe.avangarddsl.ru. [91.122.98.213]) by smtp.gmail.com with ESMTPSA id f9sm1583835lfc.43.2020.07.25.12.14.27 for <41751-done@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2020 12:14:27 -0700 (PDT) From: Oleg Pykhalov To: 41751-done@debbugs.gnu.org Subject: Re: [bug#41751] [PATCH] gnu: Add bats. References: <20200607182350.32447-1-go.wigust@gmail.com> <87bllmkl67.fsf@gnu.org> Date: Sat, 25 Jul 2020 22:14:25 +0300 In-Reply-To: <87bllmkl67.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 14 Jun 2020 12:15:44 +0200") Message-ID: <878sf7l84u.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41751-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain All suggestions were applied and pushed in master in 5a88d3dfcb382a9256e5b6d18f1487b597260944. Closing. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAl8chJEACgkQFn+OpQAa +pyQMRAAq89NHuPVDteo6gebiN/7ZQmKfaATB7xg51cgIDvjfEo2Hav7Xn0Oxept 0N5hxB/JJf6jcDrC1VrvkHqFW9yagcbcCfcgXxUp33jY0qUUMAqhB0h+lDAIVZcj LwzwsZWwKYx01MVE3TcfR5ubNeriMWQCce9PdkvA0s8Z7P73d5xYsdxeCW4XcWbo ZI03X2UowEdakAHi9i3qlNYSOsRh/rI9cm3szQb4FblQm+CPamgwuJHjvyVXmB3R EcPJ+8XyKaUtDQKExTfFoJcnaLlN90rYMVHa9/dGnZ9A0DZNsQKur6RTiZ0Mq8tW 0nXDXLT2HE7t1H0M+Xv+z61hiJhP6iytsuxwRayR3j96scBEnUgZjYsLdZwUR/i0 l2XPQHQ6YT2RtwnWu4LuATZd5lirAgi+dzyz+BAKvr1aWweVxlcV5DtRT73Fwpfu 5ybVkOnENVzWplo8J3mi6NWa1jNdb60QRfygkEWGavxuO8/vn34726bUnFoPZ+Wk 6GDOUJBsARXBJT9XrHdjiYC1wikBRjhGmM84QJFf6kEVTAjimWiYCmPAY9rrsgfs WdRC0nudS6V6tT1sIaYs2CGdrkcOsbxHpH5HgvOSAcOKtT+sbQf8RMigb+M/x6/l fap5OE3xVITBgUpWGzXAcGXU5eywEFQIHYWIA2hVV/nuRX+g38A= =GEiJ -----END PGP SIGNATURE----- --=-=-=-- ------------=_1595704502-3763-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jun 2020 18:24:22 +0000 Received: from localhost ([127.0.0.1]:54854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhzxo-0005H2-2y for submit@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 ) id 1jhzxm-0005Gv-0V for submit@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 ) id 1jhzxl-0005k0-Qm for guix-patches@gnu.org; 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 ) id 1jhzxk-0007Pk-KA for guix-patches@gnu.org; Sun, 07 Jun 2020 14:24:05 -0400 Received: by mail-lj1-x22b.google.com with SMTP id j18so4644976lji.2 for ; 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 To: guix-patches@gnu.org Subject: [PATCH] gnu: Add bats. Date: Sun, 7 Jun 2020 21:23:50 +0300 Message-Id: <20200607182350.32447-1-go.wigust@gmail.com> 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@gmail.com; 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Mathieu Othacehe +;;; Copyright © 2020 Oleg Pykhalov ;;; ;;; 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 ------------=_1595704502-3763-1--