From: "Thompson, David" <dthompson2@worcester.edu>
To: 60609@debbugs.gnu.org
Subject: [bug#60609] [PATCH] gnu: git-annex: Patch 'git-annex webapp' to use hardcoded xdg-open.
Date: Fri, 6 Jan 2023 16:30:49 -0500 [thread overview]
Message-ID: <CAJ=RwfZvCeSMA=Hcab6Gzq_LfBWvtv7dXDwFrJwHSP7kAtfkCQ@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
Hi all,
I was using git-annex for the very first time today and when I tried
to run 'git-annex webapp' I got this error:
Launching web browser on file:///tmp/webapp3975-0.html
git-annex: xdg-open: createProcess: posix_spawnp: does not exist
(No such file or directory)
WebApp crashed: xdg-open: createProcess: posix_spawnp: does not
exist (No such file or directory)
I think this should just work so I wrote a patch to replace a couple
of loose references to xdg-open with a hardcoded store path.
How does it look?
Thanks,
- Dave
[-- Attachment #2: 0001-gnu-git-annex-Patch-git-annex-webapp-to-use-hardcode.patch --]
[-- Type: text/x-patch, Size: 2254 bytes --]
From 6013aa4bf4336e06ca35ee070d090c88e34e898d Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Fri, 6 Jan 2023 16:06:47 -0500
Subject: [PATCH] gnu: git-annex: Patch 'git-annex webapp' to use hardcoded
xdg-open.
* gnu/packages/haskell-apps.scm (git-annex)[arguments]: Add 'patch-webapp'
phase.
[inputs]: Add xdg-utils.
---
gnu/packages/haskell-apps.scm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index a2405796ca..4ac486eeb6 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2021 EuAndreh <eu@euandre.org>
;;; Copyright © 2021 Stefan Reichör <stefan@xsteve.at>
;;; Copyright © 2021 Morgan Smith <Morgan.J.Smith@outlook.com>
+;;; Copyright © 2022 David Thompson <dthompson2@worcester.edu>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,6 +43,7 @@ (define-module (gnu packages haskell-apps)
#:use-module (guix build-system haskell)
#:use-module (gnu packages)
#:use-module (gnu packages curl)
+ #:use-module (gnu packages freedesktop)
#:use-module (gnu packages gl)
#:use-module (gnu packages haskell)
#:use-module (gnu packages haskell-check)
@@ -327,6 +329,13 @@ (define-public git-annex
(copy-file "Utility/Shell.hs" "/tmp/Shell.hs")
(substitute* "Utility/Shell.hs"
(("/bin/sh") (which "sh")))))
+ (add-before 'configure 'patch-webapp
+ (lambda _
+ ;; Replace loose references to xdg-open so that 'git annex
+ ;; webapp' runs without making the user also install xdg-utils.
+ (substitute* '("Assistant/WebApp/DashBoard.hs"
+ "Utility/WebApp.hs")
+ (("xdg-open") (which "xdg-open")))))
(add-before 'configure 'factor-setup
(lambda _
;; Factor out necessary build logic from the provided
@@ -471,7 +480,8 @@ (define-public git-annex
ghc-yesod-core
ghc-yesod-form
ghc-yesod-static
- rsync))
+ rsync
+ xdg-utils))
(propagated-inputs
(list git))
(native-inputs
--
2.38.1
next reply other threads:[~2023-01-06 21:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-06 21:30 Thompson, David [this message]
2023-01-08 13:38 ` [bug#60609] [PATCH] gnu: git-annex: Patch 'git-annex webapp' to use hardcoded xdg-open Mathieu Othacehe
2023-01-08 18:32 ` bug#60609: " Thompson, David
2023-01-12 14:39 ` [bug#60609] " Simon Tournier
2023-01-12 17:52 ` Thompson, David
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='CAJ=RwfZvCeSMA=Hcab6Gzq_LfBWvtv7dXDwFrJwHSP7kAtfkCQ@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=60609@debbugs.gnu.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).