From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: Re: Problem with `direnv` package definition Date: Tue, 23 Apr 2019 08:59:44 +0100 Message-ID: <87lg016tjj.fsf@cbaines.net> References: <20190420132019.priud6wucj5l2rn6@melmoth> <87o950txsa.fsf@cbaines.net> <20190421083426.6snly2v4xmlneb32@melmoth> <87mukju1is.fsf@cbaines.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:36503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIqLG-0006fd-7w for guix-devel@gnu.org; Tue, 23 Apr 2019 03:59:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIqLF-0000ub-0k for guix-devel@gnu.org; Tue, 23 Apr 2019 03:59:50 -0400 Received: from mira.cbaines.net ([212.71.252.8]:43058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIqLE-0000uE-OJ for guix-devel@gnu.org; Tue, 23 Apr 2019 03:59:48 -0400 In-reply-to: <87mukju1is.fsf@cbaines.net> 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.org@gnu.org Sender: "Guix-devel" To: Tanguy Le Carrour Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Christopher Baines writes: > Tanguy Le Carrour writes: > >> Le 04/20, Christopher Baines a =C3=A9crit : >>> Tanguy Le Carrour writes: >>> > As I said, I'm still learning. But I've tried, and here is what I've >>> > done so far [=E2=80=A6] >>> >>> I tried changing the inputs to native-inputs, and the package built for >>> me. Could you share the exact changes you made? >> >> I haven't done much: >> >> --- a/gnu/packages/shellutils.scm >> +++ b/gnu/packages/shellutils.scm >> @@ -129,12 +129,11 @@ are already there.") >> ;; Help the build scripts find the Go language dependencies. >> (add-before 'unpack 'setup-go-environment >> (assoc-ref go:%standard-phases 'setup-go-environment))))) >> - (inputs >> - `(("go" ,go) >> - ("go-github-com-burntsushi-toml" ,go-github-com-burntsushi-toml) >> - ("go-github-com-direnv-go-dotenv" ,go-github-com-direnv-go-doten= v))) >> (native-inputs >> - `(("which" ,which))) >> + `(("go" ,go) >> + ("go-github-com-burntsushi-toml" ,go-github-com-burntsushi-toml) >> + ("go-github-com-direnv-go-dotenv" ,go-github-com-direnv-go-dote= nv) >> + ("which" ,which))) >> (home-page "https://direnv.net/") >> (synopsis "Environment switcher for the shell") >> (description >> >> >> Thanks again for your time! > > What you've put above looks ok, I'm unsure why that wouldn't work... Just to follow up, as I've learned some more. So... last night I had this same failure on another machine. Turns out there is a bigger issue with the direnv package. The particular combination of the 'setup-go-environment phase from the go-build-system, and the 'unpack phase from the gnu-build-system, leads to non-deterministic behaviour, where dependent on the order in which the filesystem returns two directories, the package either builds, or fails to build. > I think it would be better to switch to using the go build system, and > the package in Guix is quite a few versions behind. As far as I understand, switching entirely to the go-build-system will avoid this issue we've both now encountered, so I've sent a patch up about this [1]. I've also created an issue to track the problem in the gnu-build-system, as I think it could check for this circumstance and error, to avoid this issue happening in the future. 1: https://issues.guix.info/issue/35386 2: https://issues.guix.info/issue/35387 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAly+xfBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XfCGxAAg/yrEfE0ofCFVeXK6U4vwFxd1CeovjSnnQyoUfinYgbCafXH49LD237K YZq13vPQQgbD2hhR7XCHV5EIlFzUVg1/ni87VOTmxABqzb9BClV3KcNuz5lFv9TM I7eAau1nRzusrzSlmsfx576EvxHdJ3m6GHdBBOIhkP7QpKUQn7m+HnGck7i+t+1H ZffdnKTJyMr8yJcLSD8XBcmmWjzfHttgJdELIzKQ5KlhbUWFi+xu4q6w1D86H32u V05V5w0lYwFJY4+hh0Z6/bFfpoCScFXUJHZnSW8R9+gCo6oPabtovsD9zuOaL+Dv dvLsygLStTl/sa8oc37ajyvBY4T8DiKJMdDVRnvduJYfS5KKykhY0v2lHubjUjnf F7BOJQl+JWwaxqFjTVIz5C8AKPAm5gUrFzEPwlLkdjMEpwxbw0BS8bEL0fo+jWe/ MIHqvgotk8vn64VkwAAquMLRzuCeUHCNEPM8a17zrj00HEUXWgDBNqUToBn7P68Z gxfWu+grfpmjkqgjKi0H2XLxAhQQi+O7D4cFi0TX7dl0kt6zrduFTIiGPDfZHWOQ hW2XZMEvWqMMAN06iq+0gHBjU1rVyVlkzUwTFMit8P3DC/YNpUXpPhJStV6BEpNL rK5TW2/8Ih8iP/L306c5gMz4MqVUXZqNVDAdmY4hM+yATuy9H5U= =cnt6 -----END PGP SIGNATURE----- --=-=-=--