From 6013aa4bf4336e06ca35ee070d090c88e34e898d Mon Sep 17 00:00:00 2001 From: David Thompson 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 ;;; Copyright © 2021 Stefan Reichör ;;; Copyright © 2021 Morgan Smith +;;; Copyright © 2022 David Thompson ;;; ;;; 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