From: Maxime Devos <maximedevos@telenet.be>
To: Antero Mejr <antero@mailbox.org>, 56770@debbugs.gnu.org
Subject: [bug#56770] [PATCH] gnu: Add grimshot.
Date: Tue, 26 Jul 2022 17:46:20 +0200 [thread overview]
Message-ID: <e1757e40-2b7b-2766-f070-4538aadff60b@telenet.be> (raw)
In-Reply-To: <20220725205412.336878-1-antero@mailbox.org>
[-- Attachment #1.1.1: Type: text/plain, Size: 1744 bytes --]
> + (copy-recursively
> + (string-append #$(package-source this-package) "/contrib") ".")
I would have expected trivial-build-system to automatically unpack the
source, so maybe this can be simplified to (chdir "/contrib") (untested!)
On 25-07-2022 22:54, Antero Mejr via Guix-patches via wrote:
> + (system
> + (string-append #$scdoc "/bin/scdoc < grimshot.1.scd > grimshot.1"))
This ignores any errors coming from 'system'. Try (invoke ...) +
with-input-from-file + with-output-to-file instead, which will report
errors as exceptions:
(with-input-from-file "grimshot.1.scd"
(lambda ()
(with-output-to-file "grimshot.1"
(lambda ()
(invoke #+(file-append (this-package-native-input "scdoc")
"/bin/scdoc")))))
Here it is important to use #+ instead of #$ for cross-compilation. I
use this-package-native-input here to make the --with-input
transformation work.
> + (substitute* "grimshot"
> + (("date ") (string-append #$coreutils "/bin/date "))
> + (("jq ") (string-append #$jq "/bin/jq "))
> + (("swaymsg ") (string-append #$sway "/bin/swaymsg "))
> + (("notify-send ") (string-append #$libnotify "/bin/notify-send "))
> + (("grim ") (string-append #$grim "/bin/grim "))
> + (("slurp ") (string-append #$slurp "/bin/slurp "))
> + (("wl-copy ") (string-append #$wl-clipboard "/bin/wl-copy ")))
Likewise, you should use this-package-input here (but unlike the
previous case, not this-package-native-input).
(I only looked at the package definition, not the underlying source
code, and did not test it)
Greetings,
Maxime
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2022-07-26 15:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 20:54 [bug#56770] [PATCH] gnu: Add grimshot Antero Mejr via Guix-patches via
2022-07-26 15:46 ` Maxime Devos [this message]
2022-07-26 15:52 ` Maxime Devos
2022-07-26 15:49 ` Maxime Devos
2022-07-26 17:58 ` [bug#56770] [PATCH v2] " Antero Mejr via Guix-patches via
2022-07-26 18:17 ` Maxime Devos
2022-07-26 18:29 ` Maxime Devos
2022-07-26 20:48 ` [bug#56770] [PATCH v3] " Antero Mejr via Guix-patches via
2022-07-26 22:06 ` [bug#56770] LGTM: [PATCH v3] gnu: Add grimshot. (LGTM) Maxime Devos
2022-07-27 18:42 ` bug#56770: " Liliana Marie Prikler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1757e40-2b7b-2766-f070-4538aadff60b@telenet.be \
--to=maximedevos@telenet.be \
--cc=56770@debbugs.gnu.org \
--cc=antero@mailbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).