From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41754) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3eua-0004s6-7S for guix-patches@gnu.org; Mon, 17 Feb 2020 06:50:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3euY-0005qY-Hm for guix-patches@gnu.org; Mon, 17 Feb 2020 06:50:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60333) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3euY-0005pw-2O for guix-patches@gnu.org; Mon, 17 Feb 2020 06:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3euX-00066F-WC for guix-patches@gnu.org; Mon, 17 Feb 2020 06:50:02 -0500 Subject: [bug#39599] [PATCH 1/4] build-system: Add copy-build-system. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:41423) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3etY-00037Y-Mw for guix-patches@gnu.org; Mon, 17 Feb 2020 06:49:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3etX-00056N-Q9 for guix-patches@gnu.org; Mon, 17 Feb 2020 06:49:00 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:33846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3etX-00055D-Jq for guix-patches@gnu.org; Mon, 17 Feb 2020 06:48:59 -0500 Received: by mail-wr1-x431.google.com with SMTP id n10so17398604wrm.1 for ; Mon, 17 Feb 2020 03:48:59 -0800 (PST) References: <20200214125144.4185-1-mail@ambrevar.xyz> <20200217111228.23716-1-mail@ambrevar.xyz> From: Mathieu Othacehe Message-ID: <87tv3po2oy.fsf@gmail.com> In-reply-to: <20200217111228.23716-1-mail@ambrevar.xyz> Date: Mon, 17 Feb 2020 12:48:56 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39599@debbugs.gnu.org Hey Pierre, Thanks for this patch! A few remarks below. > +@item @code{("foo/bar" "share/my-app/baz")}: Install @code{bar}t o @code{share/my-app/baz}. ^ typo > + (and (not target) ;XXX: no cross-compilation Why don't we support cross-compilation here? > + (set! target (if (string-suffix? "/" target) > + (string-append target (basename source)) > + target)) We could use let instead of set!, right? > + (define* (make-file-predicate matches matches-regexp #:optional (default-value #t)) > + (if (or matches matches-regexp) > + (lambda (file) > + (any (lambda (pred) (pred file)) > + (append > + (map (lambda (str) > + (lambda (f) (string-suffix? str f))) > + (or matches '())) > + (map (lambda (regexp) > + (lambda (f) (regexp-exec (make-regexp regexp) f))) > + (or matches-regexp '()))))) > + (const default-value))) You could maybe explain a bit what this function does. And how 'file' differs from 'f'. Thanks, Mathieu