fix impd by spacecadet

This commit is contained in:
千住柱間 2024-06-30 19:37:10 -04:00
parent 6d3c23a7f7
commit 8d7fbabad0
Signed by: hashirama
GPG key ID: 53E62470A86BC185

View file

@ -2,9 +2,14 @@
#:use-module (gnu packages video) #:use-module (gnu packages video)
#:use-module (guix build-system copy) #:use-module (guix build-system copy)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (gnu packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (guix build-system gnu)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
#:use-module (guix search-paths)
#:use-module ((guix licenses) #:prefix license:)) #:use-module ((guix licenses) #:prefix license:))
@ -28,6 +33,52 @@
(license license:gpl3))) (license license:gpl3)))
(define-public grep
(package
(name "grep")
(version "3.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/grep/grep-"
version ".tar.xz"))
(sha256
(base32
"10n3mc9n1xmg85hpxyr4wiqzfp27ffxzwhvkv021j27vnk0pr3a9"))
(patches (search-patches "grep-timing-sensitive-test.patch"))))
(build-system gnu-build-system)
(native-inputs (list perl)) ;some of the tests require it
(inputs (list pcre2))
(arguments
`(#:configure-flags
(list "--enable-perl-regexp")
#:phases
(modify-phases %standard-phases
(add-after 'install 'fix-egrep-and-fgrep
;; Patch 'egrep' and 'fgrep' to execute 'grep' via its
;; absolute file name instead of searching for it in $PATH.
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(substitute* (list (string-append bin "/egrep")
(string-append bin "/fgrep"))
(("^exec grep")
(string-append "exec " bin "/grep"))))))
)))
(synopsis "Print lines matching a pattern")
(description
"grep is a tool for finding text inside files. Text is found by
matching a pattern provided by the user in one or many files. The pattern
may be provided as a basic or extended regular expression, or as fixed
strings. By default, the matching text is simply printed to the screen,
however the output can be greatly customized to include, for example, line
numbers. GNU grep offers many extensions over the standard utility,
including, for example, recursive directory searching.")
(license license:gpl3+)
(home-page "https://www.gnu.org/software/grep/")))
(define-public impd (define-public impd
(package (package
(name "impd") (name "impd")
@ -44,12 +95,22 @@
(build-system copy-build-system) (build-system copy-build-system)
(arguments (arguments
(list #:install-plan (list #:install-plan
#~'(("impd" "bin/")))) #~'(("impd" "bin/"))
(inputs (list ffmpeg)) #:phases
#~(modify-phases %standard-phases
(add-after 'install 'make-wrapper
(lambda* (#:key inputs outputs #:allow-other-keys)
(wrap-program (string-append (assoc-ref outputs "out") "/bin/impd")
`("PATH" ":" prefix
(,(string-append (assoc-ref inputs "grep")
"/bin")))))))))
(inputs (list grep))
;; (propagated-inputs (list ffmpeg)) ;; TODO fix this, since we need ffmpeg at runtime
(home-page "https://github.com/Ajatt-Tools/impd") (home-page "https://github.com/Ajatt-Tools/impd")
(synopsis "AJATT-style passive listening and condensed audio without bloat.") (synopsis "AJATT-style passive listening and condensed audio without bloat.")
(description "AJATT-style passive listening and condensed audio without bloat.") (description "AJATT-style passive listening and condensed audio without bloat.")
(license license:gpl3))) (license license:gpl3)))
navidrome-bin
impd