Thompson, David wrote 2 years ago
(address . guix-patches@gnu.org)
Hi all,
I'm back with another 'git-annex webapp' patch. In order for the
git-annex assistant's file watching capabilities to work it needs
access to the lsof utility.
WDYT?
- Dave
From 86914063988c01eb399097e7746a81a4ae51c159 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Mon, 9 Jan 2023 18:06:10 -0500
Subject: [PATCH] gnu: git-annex: Patch 'git-annex webapp' to use hardcoded
lsof.
* gnu/packages/haskell-apps.scm (git-annex)[arguments]: Substitute "lsof" in
'patch-webapp' phase.
[inputs]: Add lsof.
---
gnu/packages/haskell-apps.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
Toggle diff (35 lines)
diff --git a/gnu/packages/haskell-apps.scm b/gnu/packages/haskell-apps.scm
index 4ac486eeb6..9cb383eeb2 100644
--- a/gnu/packages/haskell-apps.scm
+++ b/gnu/packages/haskell-apps.scm
@@ -50,6 +50,7 @@ (define-module (gnu packages haskell-apps)
#:use-module (gnu packages haskell-crypto)
#:use-module (gnu packages haskell-web)
#:use-module (gnu packages haskell-xyz)
+ #:use-module (gnu packages lsof)
#:use-module (gnu packages ncurses)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
@@ -335,7 +336,11 @@ (define-public 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")))))
+ (("xdg-open") (which "xdg-open")))
+ ;; Also replace loose references to lsof.
+ (substitute* "Assistant/Threads/Watcher.hs"
+ (("\"lsof\"")
+ (string-append "\"" (which "lsof") "\"")))))
(add-before 'configure 'factor-setup
(lambda _
;; Factor out necessary build logic from the provided
@@ -480,6 +485,7 @@ (define-public git-annex
ghc-yesod-core
ghc-yesod-form
ghc-yesod-static
+ lsof
rsync
xdg-utils))
(propagated-inputs
--
2.38.1