From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:56903) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4idj-00031X-5k for guix-patches@gnu.org; Thu, 20 Feb 2020 05:01:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4idh-0003H7-Rq for guix-patches@gnu.org; Thu, 20 Feb 2020 05:01:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:37888) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4idh-0003Gq-O5 for guix-patches@gnu.org; Thu, 20 Feb 2020 05:01:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j4idh-0006TO-NI for guix-patches@gnu.org; Thu, 20 Feb 2020 05:01:01 -0500 Subject: [bug#39599] [PATCH 1/4] build-system: Add copy-build-system. Resent-Message-ID: From: Pierre Neidhardt In-Reply-To: <87ftf5lhep.fsf@elephly.net> References: <20200214125144.4185-1-mail@ambrevar.xyz> <20200217111228.23716-1-mail@ambrevar.xyz> <87ftf5lhep.fsf@elephly.net> Date: Thu, 20 Feb 2020 11:00:32 +0100 Message-ID: <877e0h7f3z.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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: Ricardo Wurmus Cc: 39599@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ricardo Wurmus writes: > --8<---------------cut here---------------start------------->8--- > (define* (make-file-predicate suffixes matches-regexp #:optional (default= -value #t)) > (if (or suffixes matches-regexp) > (let* ((suffixes (or suffixes '())) > (regexps (map make-regexp (or matches-regexp '()))) > (predicates (append > (map (lambda (str) > (cut string-suffix? str <>)) > suffixes) > (map (lambda (regexp) > (cut regexp-exec regexp <>)) > regexps)))) > (lambda (file) > (any (cut <> file) predicates))) > (const default-value))) > --8<---------------cut here---------------end--------------->8--- Good suggestion, thanks! The logic of this function is a bit convoluted in my opinion, but I can't think of something simpler and just as short. But since it's a local function, I guess it's not a big deal. > Also, as Mathieu wrote, please don=E2=80=99t use SET!. No problem, but I don't recall seeing this message. Where did Mathieu write this? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl5OWMAACgkQm9z0l6S7 zH/6CwgAqHWwzvZQjyWiZyP2sDS6RmV/9PobVPxzQjsITMlfyqaymO0/1IJdiuE9 t8IqAWPg/l5fKqs46OlsNGMO1pn1E0by8ygAUcLDWI2euRrwp2Bzej27+3IKE6el 1MKrM06zCssL0qMTtHmXpoYBdNMfXhxFcXtefddpzPrU4EtrX1kX9yRRY/BcAbBZ erLFcTttoqwe6nHwfq7oFxqTE9mweYOxap2r7ZpUWVwPCn9+3nALM5hZoBx3qVvl JgMvq612ixdPy9IlzGNE+Ntdgt/1Zb8a5nX9BUp9ePfqm/EIefMps2XMEj+Ee+X+ yW8C+KiwTwpKHpEtEANtjC4AAPPZrQ== =2fpl -----END PGP SIGNATURE----- --=-=-=--