[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#44039] [PATCH] gnu: Add slade.
From: |
James Smith |
Subject: |
[bug#44039] [PATCH] gnu: Add slade. |
Date: |
Sat, 17 Oct 2020 00:41:50 +0000 (UTC) |
Tobias,
On Fri, 16 Oct 2020 14:07:46 -0700,
Tobias Geerinckx-Rice wrote:
>
>> +(define-public slade
>>
> Let's keep modules vaguely alphabetical. Could you move this above
>
> ‘tiled’?
>
Sure thing, I didn't see anything in the manual about sorting alphabetically and
other definitions weren't in order either.
>
>> + (add-after 'install 'patch-gdk-backend
>>
> Nitpick: it's not patching anything.
>
Now that you point that out, patch wasn't the word I was looking for.
>
>> + `("GDK_BACKEND" "" = (,"x11")))
>>
> This works but the "" and , are redundant.
>
Thanks for pointing that out, I didn't see any existing examples doing it that
way.
> 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.
>
> See
>
> ;; https://github.com/sirjuddington/SLADE/issues/1097
>
> for details.
>
> (lambda* (#:key outputs #:allow-other-keys)
>
> (wrap-program
>
> (string-append (assoc-ref outputs "out")
>
> "/bin/slade")
>
> '("GDK_BACKEND" = ("x11")))
>
> #t)))
>
Done.
>
>> + #:tests? #f))
>>
> Are there no tests at all? If so, note in a comment:
>
> #:tests? #f)) ; no test suite
>
Yeah, no tests.
> There's one more problem:
>
> set(ZIP_COMMAND "${ZIPTOOL_ZIP_EXECUTABLE}" -X -UN=UTF8 -9 -r \
>
> "${CMAKE_BINARY_DIR}/slade.pk3" .)
>
> Even zip -X won't create an identical archive on every run. There
>
> 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.
>
I didn't think to check zip-compressed files.
> The following made multiple builds on one machine identical, but was
>
> not consistent between file systems, probably due to readdir 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" "{}" "+")))
>
> I suppose I could try using find to sort the files before invoking
>
> zip, or something. Thoughts?
>
Unless there's a better way, let's do that.
Thanks for your help,
James Smith
v2-0001-gnu-Add-slade.patch
Description: Text document