From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 16 17:07:49 2020 Received: (at 44039) by debbugs.gnu.org; 16 Oct 2020 21:07:49 +0000 Received: from localhost ([127.0.0.1]:32792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTWx3-00073v-28 for submit@debbugs.gnu.org; Fri, 16 Oct 2020 17:07:49 -0400 Received: from tobias.gr ([80.241.217.52]:56222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kTWwy-00073j-HE for 44039@debbugs.gnu.org; Fri, 16 Oct 2020 17:07:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=n3eFK1c+CjQVKclUJAjAVqNqoASB6w9/lEY0q7qGceQ=; h=date:in-reply-to: references:subject:cc:to:from; b=VaVs+ikkVxvGbhfZFgkdBcnCHxj5A+Q7/xREL AvRNttJhpeRNEL84sllaC27shl17PijScNn5Yf2FmDCdQmZm5dSwrt+EjKtjFNXo1dM7Da p3hd8fBucwXg7AinfFzV4AdsBnPWz3/L3hB5aekos1iSNU4Ig/+FjF4GDEJeJiiTV9GZ8/ mdCDm+FgLwEOYBmqJAG+a8GM8XChIHjwG1sewYN97Px+R+1IoE+umwh5rgQFVhfjqO+47T wiD6CaS/6VRjdsNGnZRvXtmjl6baLtyODFQrqNJWH+Xsu23RiAx9ev8SoHTiev8tQNneNu 8kvhhlbZB4MB+mB3BszKblx4w== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id c8ef7036 (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Fri, 16 Oct 2020 21:07:56 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; From: Tobias Geerinckx-Rice To: James Smith Subject: Re: [bug#44039] [PATCH] gnu: Add slade. References: <20201016184333.1445-1-jsubuntuxp@disroot.org> In-reply-to: <20201016184333.1445-1-jsubuntuxp@disroot.org> Date: Fri, 16 Oct 2020 23:07:46 +0200 Message-ID: <87zh4lanh9.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 44039 Cc: guix-patches@gnu.org, 44039@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable James, Thanks for the patch! James Smith =E5=86=99=E9=81=93=EF=BC=9A > +(define-public slade Let's keep modules vaguely alphabetical. Could you move this=20 above =E2=80=98tiled=E2=80=99? > + (add-after 'install 'patch-gdk-backend Nitpick: it's not patching anything. > + ;; Set GDK_BACKEND to x11 to prevent crash on=20 > Wayland. > + ;; See=20 > https://github.com/sirjuddington/SLADE/issues/1097 for details. > + (lambda* _ No need for lambda* over lambda when you're not using any of its=20 extended features.... > + (string-append (assoc-ref %outputs "out")=20 > "/bin/slade") ...however, you *could* use its keyword arguments to get rid of=20 this ugly %outputs pseudo-global. See below. > + `("GDK_BACKEND" "" =3D (,"x11"))) This works but the "" and , are redundant. All in all, the phase can be rewritten as: (add-after 'install 'wrap-with-x11-gdk-backend ;; Set GDK_BACKEND to x11 to prevent crash on Wayland.=20 See ;; https://github.com/sirjuddington/SLADE/issues/1097=20 for details. (lambda* (#:key outputs #:allow-other-keys) (wrap-program (string-append (assoc-ref outputs "out")=20 "/bin/slade") '("GDK_BACKEND" =3D ("x11"))) #t))) > + #:tests? #f)) Are there no tests at all? If so, note in a comment: #:tests? #f)) ; no test suite Same if there are tests but they're broken or pointless (linting=20 etc.). There's one more problem: set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -X -UN=3DUTF8 -9 -r \ "${CMAKE_BINARY_DIR}/slade.pk3" .) Even zip -X won't create an identical archive on every run. There=20 doesn't seem to be an option to do so. The result: --- /gnu/store/aaa-slade-3.1.12a/share/slade3/slade.pk3 +++ /gnu/store/bbb-slade-3.1.12a/share/slade3/slade.pk3 Zip file size: 3624588 bytes, number of entries: 768 -drwxr-xr-x 3.0 unx 0 b- stor 20-Oct-16 19:17 html/ -drwxr-xr-x 3.0 unx 0 b- stor 20-Oct-16 19:17 config/ -drwxr-xr-x 3.0 unx 0 b- stor 20-Oct-16 19:17 config/colours/ +drwxr-xr-x 3.0 unx 0 b- stor 20-Oct-16 19:31 html/ +drwxr-xr-x 3.0 unx 0 b- stor 20-Oct-16 19:31 config/ +drwxr-xr-x 3.0 unx 0 b- stor 20-Oct-16 19:31 config/colours/ This is not ideal: Guix aims for reproducible builds. The following made multiple builds on one machine identical, but=20 was not consistent between file systems, probably due to readdir=20 order: + (add-before 'build 'reset-slade.pk3-timestamps + ;; This appears sufficient to make slade.pk3 reproducible. + (lambda _ + (invoke "find" "../source/dist/res" "-exec" "touch" + "--no-dereference" "-t" "197001010000.00" "{}"=20 "+"))) I suppose I could try using find to sort the files before invoking=20 zip, or something. Thoughts? Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX4oLog0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15rtQA/j60C81XRN19jxaTSDhaRVPAYtb+AGfLS60C8ppR UZ13AP9gENWeHc6UhsPw0jtjxa+1lzdC7z3birrh9iXRDzW8AA== =dJU1 -----END PGP SIGNATURE----- --=-=-=--