Skip to content

Commit

Permalink
Merge bitcoin#31323: guix: swap moreutils for just sponge
Browse files Browse the repository at this point in the history
e8f50c5 guix: swap moreutils for just sponge (fanquake)

Pull request description:

  Switch to building the only `moreutils` utility we actually need (`sponge`). This results in having less unused stuff in the Guix environment (i.e all the other `moreutils` utilities), and, the dependency graph is simplified. i.e we no-longer have a dependency on `perl`, `docbook` etc, for this package.

  Current `moreutils` dependency graph:
  ![moreutils](https://github.com/user-attachments/assets/b91a8609-1434-4094-ad12-93332737ef0f)

  In the Guix env, `chronic`, `combine`, `errno`, `ifdata`, `ifne`, `isutf8`, `lckdo`, `mispipe`, `parallel`, `pee`, `ts`, `vidir`, `vipe` & `zrun` (plus their `*.real` variants) are removed.

ACKs for top commit:
  hebasto:
    ACK e8f50c5.
  TheCharlatan:
    Re-ACK e8f50c5

Tree-SHA512: 3687ec4a821ff79c26ee839d2af879166edb7e179287a9574eca8fbf34bed1fea8fcdad822a2140d0a0089e1820f3fef29a6100e0e8da788896e1f7bac5ec3e6
  • Loading branch information
fanquake committed Nov 27, 2024
2 parents 70e20ea + e8f50c5 commit efdb49a
Showing 1 changed file with 33 additions and 3 deletions.
36 changes: 33 additions & 3 deletions contrib/guix/manifest.scm
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
((gnu packages linux) #:select (linux-libre-headers-6.1))
(gnu packages llvm)
(gnu packages mingw)
(gnu packages moreutils)
(gnu packages pkg-config)
((gnu packages python) #:select (python-minimal))
((gnu packages python-build) #:select (python-tomli))
((gnu packages python-crypto) #:select (python-asn1crypto))
((gnu packages tls) #:select (openssl))
((gnu packages version-control) #:select (git-minimal))
(guix build-system cmake)
(guix build-system gnu)
(guix build-system python)
(guix build-system trivial)
(guix download)
(guix gexp)
(guix git-download)
((guix licenses) #:prefix license:)
(guix packages)
((guix utils) #:select (substitute-keyword-arguments)))
((guix utils) #:select (cc-for-target substitute-keyword-arguments)))

(define-syntax-rule (search-our-patches file-name ...)
"Return the list of absolute file names corresponding to each
Expand Down Expand Up @@ -487,6 +487,36 @@ inspecting signatures in Mach-O binaries.")
(("^install-others =.*$")
(string-append "install-others = " out "/etc/rpc\n")))))))))))))

;; The sponge tool from moreutils.
(define-public sponge
(package
(name "sponge")
(version "0.69")
(source (origin
(method url-fetch)
(uri (string-append
"https://git.joeyh.name/index.cgi/moreutils.git/snapshot/
moreutils-" version ".tar.gz"))
(file-name (string-append "moreutils-" version ".tar.gz"))
(sha256
(base32
"1l859qnzccslvxlh5ghn863bkq2vgmqgnik6jr21b9kc6ljmsy8g"))))
(build-system gnu-build-system)
(arguments
(list #:phases
#~(modify-phases %standard-phases
(delete 'configure)
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out") "/bin")))
(install-file "sponge" bin)))))
#:make-flags
#~(list "sponge" (string-append "CC=" #$(cc-for-target)))))
(home-page "https://joeyh.name/code/moreutils/")
(synopsis "Miscellaneous general-purpose command-line tools")
(description "Just sponge")
(license license:gpl2+)))

(packages->manifest
(append
(list ;; The Basics
Expand All @@ -502,7 +532,7 @@ inspecting signatures in Mach-O binaries.")
patch
gawk
sed
moreutils
sponge
;; Compression and archiving
tar
gzip
Expand Down

0 comments on commit efdb49a

Please sign in to comment.