From patchwork Tue Jul 6 07:23:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Tropin X-Patchwork-Id: 31189 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 92E2827BC81; Tue, 6 Jul 2021 08:27:54 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 285F227BC78 for ; Tue, 6 Jul 2021 08:27:54 +0100 (BST) Received: from localhost ([::1]:38440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m0fUm-0005LY-TV for patchwork@mira.cbaines.net; Tue, 06 Jul 2021 03:27:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m0fR4-000600-OF for guix-patches@gnu.org; Tue, 06 Jul 2021 03:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m0fR4-0006NF-Er for guix-patches@gnu.org; Tue, 06 Jul 2021 03:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m0fR4-0005KB-Cg for guix-patches@gnu.org; Tue, 06 Jul 2021 03:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49419] [PATCH 1/4] home-services: Add most essential home services Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 06 Jul 2021 07:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49419 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos , 49419@debbugs.gnu.org Received: via spool by 49419-submit@debbugs.gnu.org id=B49419.162555620920419 (code B ref 49419); Tue, 06 Jul 2021 07:24:02 +0000 Received: (at 49419) by debbugs.gnu.org; 6 Jul 2021 07:23:29 +0000 Received: from localhost ([127.0.0.1]:47162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0fQW-0005JH-Lg for submit@debbugs.gnu.org; Tue, 06 Jul 2021 03:23:28 -0400 Received: from mail-lf1-f44.google.com ([209.85.167.44]:33481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m0fQU-0005J1-21 for 49419@debbugs.gnu.org; Tue, 06 Jul 2021 03:23:26 -0400 Received: by mail-lf1-f44.google.com with SMTP id t17so36706809lfq.0 for <49419@debbugs.gnu.org>; Tue, 06 Jul 2021 00:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=7lUQP/fpEOKv5wVmwNGt1oRKRbD56nqF/IDoIFiqVp8=; b=ftP3bYWwppQ2zx8VL4cpzmBfkhGoLq20G1S3Wpj8dimiN8piu7OLvi4Dg+C3dWwFz+ WlHoGDhAk5Mkqx8uJVre/XeM8JBP37yim3DCeDJvuvAN8oysvhrXB2xq0jATQxTdiJGW bWApb7rSXJiZ0gq20g3HrpBu12MW2efZ+pycvZo5hBoH5nVUeedZXg9D11n7ebU4UMwr +gzb0WTW0z2M0fE/A2wz1bdIFglvm0X6JeUQLGkgSH89hk9LyLT/MfwxLlQlv5wE5FmW ZxKcJAf2dx2yEHCc7IbhxSDHW/nlW8OhtXZ1f9e3Z37ftD3a62a7s1cDZrUUehNymiSU g5og== 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:in-reply-to:references:date :message-id:mime-version; bh=7lUQP/fpEOKv5wVmwNGt1oRKRbD56nqF/IDoIFiqVp8=; b=SEfY7PJXk5dyRydqz3yy9RjA16ZCNPMNPnpendWg5EzZ8dWWOTuXXayIdaGEd59ddM R4dgcKZTDdaZepeSzAsLDNAEmh94lXXW7vWZGmF0sYYjZQedWcg1qOkNLBR/HMPMnUnb pPrra4QrAEhPu9av9czQKIkTjv1ywHKx1dBgzJ/RpH6jt9LMu+yp9Xj/H2pB8JNboeGS GrLnCFVcT+yDLlzmeRJwvCsk0fe2OWmH9wT/pG6G70WN6LvDn6TJzAIEpsWPKul3TMGK YfJpxa+k4f8P64FpifoTgCJlj9i4eUkBlaiBh4iXEOHBGgvqhupb2svJTkvNXImjra9d Hujw== X-Gm-Message-State: AOAM532qkTbm3mMHLAgEky7PYrjEqtdaWW2ZZjOqTFqqAe5IDQZIZc0k jfWI3nP7vNBE+tENUnMAbvsJnKtt6NtHbg== X-Google-Smtp-Source: ABdhPJyj45WrCT03llE9sGUxZAKTKxbswtuSQAx8muInqtypbnuTbcVKOKmeSmU6is6UyPS6Ent0TQ== X-Received: by 2002:ac2:43a9:: with SMTP id t9mr2742533lfl.568.1625556199657; Tue, 06 Jul 2021 00:23:19 -0700 (PDT) Received: from ixy ([109.252.117.164]) by smtp.gmail.com with ESMTPSA id b43sm1398208ljr.55.2021.07.06.00.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 00:23:18 -0700 (PDT) From: Andrew Tropin In-Reply-To: <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@telenet.be> References: <87y2akhiz1.fsf@trop.in> <87wnq4hivq.fsf@trop.in> <9ee31c62aef0a42b15b48ece2c1d0fe765fdcc83.camel@telenet.be> Date: Tue, 06 Jul 2021 10:23:15 +0300 Message-ID: <878s2jsy70.fsf@trop.in> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Maxime Devos writes: > Hi, > > Andrew Tropin schreef op ma 05-07-2021 om 18:37 [+0300]: >> + (if (file-exists? (he-init-file new-home)) >> + (let* ((port ((@@ (ice-9 popen) open-input-pipe) >> + (format #f "source ~a && env" >> + (he-init-file new-home)))) >> + (result ((@@ (ice-9 rdelim) read-delimited) "" port)) >> + (vars (map (lambda (x) >> + (let ((si (string-index x #\=))) >> + (cons (string-take x si) >> + (string-drop x (1+ si))))) >> + ((@@ (srfi srfi-1) remove) >> + string-null? >> + (string-split result #\newline))))) > > Why are you using @@ here? 'open-input-pipe', 'read-delimited' and 'remove' > are exported variables, so you can just use @ instead of the magic evil @@ > operator. Addressed the issue with the following patch. I can use different methods to attach/prepare/send patches and reply to the reviews, sorry for any inconveniences in advance) I'll stick to some approach, once I'll practice a few of them. From 27998096bf5b4ccd1c66ef71c1280faf0e11be72 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Mon, 5 Jul 2021 19:22:40 +0300 Subject: [PATCH] (toberebased) home-services: Use @ instead of @@ --- gnu/home-services.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/home-services.scm b/gnu/home-services.scm index a06cd72459..78e5603edf 100644 --- a/gnu/home-services.scm +++ b/gnu/home-services.scm @@ -280,15 +280,15 @@ extended with one gexp."))) (readlink he-path) #f)))) (if (file-exists? (he-init-file new-home)) - (let* ((port ((@@ (ice-9 popen) open-input-pipe) + (let* ((port ((@ (ice-9 popen) open-input-pipe) (format #f "source ~a && env" (he-init-file new-home)))) - (result ((@@ (ice-9 rdelim) read-delimited) "" port)) + (result ((@ (ice-9 rdelim) read-delimited) "" port)) (vars (map (lambda (x) (let ((si (string-index x #\=))) (cons (string-take x si) (string-drop x (1+ si))))) - ((@@ (srfi srfi-1) remove) + ((@ (srfi srfi-1) remove) string-null? (string-split result #\newline))))) (close-port port) @@ -340,7 +340,7 @@ with one gexp, but many times, and all gexps must be idempotent."))) (define (equal-regulars? file1 file2) "Check if FILE1 and FILE2 are bit for bit identical." (let* ((cmp-binary #$(file-append - (@@ (gnu packages base) diffutils) "/bin/cmp")) + (@ (gnu packages base) diffutils) "/bin/cmp")) (status (system* cmp-binary file1 file2))) (= status 0))) -- 2.32.0