From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: New build system: copy-build-system Date: Tue, 28 Jan 2020 14:39:45 +0100 Message-ID: <87v9ovbsym.fsf@ambrevar.xyz> References: <87sgk2dkuv.fsf@ambrevar.xyz> <871rrkvi0p.fsf@elephly.net> <874kwfj2hk.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35889) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwR5r-0004nC-Tu for guix-devel@gnu.org; Tue, 28 Jan 2020 08:39:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwR5q-00031u-7u for guix-devel@gnu.org; Tue, 28 Jan 2020 08:39:51 -0500 In-Reply-To: <874kwfj2hk.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= , Ricardo Wurmus Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Regarding the "install-plan", I suggest the following syntax: (SOURCE TARGET [FILTERS]) In the above, FILTERS are optional. =2D When SOURCE matches a file or directory without trailing slash, install= it to TARGET. - If TARGET has a trailing slash, install SOURCE basename beneath TARGET. - Otherwise install SOURCE as TARGET. =2D When SOURCE is a directory with a trailing slash, or when FILTERS are u= sed, the trailing slash of TARGET is implied. - Without FILTERS, install the full SOURCE _content_ to TARGET. The paths relative to SOURCE are preserved within TARGET. - With FILTERS among `#:include`, `#:include-regexp`, `#:exclude`, `#:exclude-regexp`: - With `#:include`, install only the exact subpaths in the list. - With `#:include-regexp`, install subpaths matching the regexps in the= list. - The `#:exclude*` FILTERS work similarly. Without `#:include*` flags, install every subpath but the files matching the `#:exlude*` filters. If both `#:include*` and `#:exclude*` are specified, the exclusion is= done on the inclusion list. Examples: =2D `("foo/bar" "share/my-app/")`: Install bar to "share/my-app/bar". =2D `("foo/bar" "share/my-app/baz")`: Install bar to "share/my-app/baz". =2D `("foo/" "share/my-app")`: Install the content of foo inside "share/my-= app", e.g. install "foo/sub/file" to "share/my-app/sub/file". =2D `("foo/" "share/my-app" #:include ("sub/file"))`: Install only "foo/sub= /file" to "share/my-app/sub/file". =2D `("foo/sub" "share/my-app" #:include ("file"))`: Install "foo/sub/file"= to "share/my-app/file". Maybe instead of having two #:include and #:include-regexp we could have ju= st one #:include in which the list elements have a "marker" that tells whether= they are regexps or not. Clojure uses #"..." to mark regexps. Does Guile have something similar? Any other suggestion? =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl4wOaEACgkQm9z0l6S7 zH8k2wf+K0hsPl4Hr4YtdzKV8dTObPi8teIGWR7M5AhP3TBOAuEm57PwMzSX6pDZ Tl5Gp3epg4gUvYKJZn8Ki4ZgF0t1wvSok4lOkZpL+C0X3Upk/fTLcOm9zxF4Ev5f FcjgkXf4K3hG9BMq3kq5i5dm/NMLfsMWqBpEoXvj14XaoywkRcD+f8/2Rex/Gi1V Im7bsJc8y+84wpOfred1UyL7VlQZhdFfxOcIsVDH+b/KJENLo9aAgMyL2FqC1MLj Tmb8ox/+X+8YvSlziH5yZ2KaNn4+9DqzHYD5uO9vmggfy6ReW6d5mo9gjW47VpGc spEwwuAOrZLSYBMa3SLiICLtKEM1uw== =8+Vt -----END PGP SIGNATURE----- --=-=-=--