GNU bug report logs -
#56770
[PATCH] gnu: Add grimshot.
Previous Next
Reported by: Antero Mejr <antero <at> mailbox.org>
Date: Mon, 25 Jul 2022 20:55:02 UTC
Severity: normal
Tags: patch
Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 56770 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> + (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
[OpenPGP_0x49E3EE22191725EE.asc (application/pgp-keys, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]
This bug report was last modified 3 years and 19 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.