(define-module (ruther packages ripgrep-all)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix download)
#:use-module (guix build-system cargo)
#:use-module (gnu packages crates-database)
#:use-module (gnu packages crates-io)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages compression)
#:use-module (gnu packages video)
#:use-module (gnu packages haskell-xyz)
#:use-module (gnu packages pdf)
#:use-module (gnu packages rust-apps)
#:use-module (gnu packages terminals))
(define-public rust-tokio-tar-0.3
(package
(name "rust-tokio-tar")
(version "0.3.1")
(source
(origin
(method url-fetch)
(uri (crate-uri "tokio-tar" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0xffvap4g7hlswk5daklk3jaqha6s6wxw72c24kmqgna23018mwx"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs (("rust-filetime" ,rust-filetime-0.2)
("rust-futures-core" ,rust-futures-core-0.3)
("rust-libc" ,rust-libc-0.2)
("rust-redox-syscall" ,rust-redox-syscall-0.3)
("rust-tokio" ,rust-tokio-1)
("rust-tokio-stream" ,rust-tokio-stream-0.1)
("rust-xattr" ,rust-xattr-1))))
(home-page "https://github.com/vorot93/tokio-tar")
(synopsis
"Rust implementation of an async TAR file reader and writer. This library does not
currently handle compression, but it is abstract over all I/O readers and
writers. Additionally, great lengths are taken to ensure that the entire
contents are never required to be entirely resident in memory all at once.")
(description
"This package provides a Rust implementation of an async TAR file reader and
writer. This library does not currently handle compression, but it is abstract
over all I/O readers and writers. Additionally, great lengths are taken to
ensure that the entire contents are never required to be entirely resident in
memory all at once.")
(license (list license:expat license:asl2.0))))
(define-public rust-tokio-rusqlite-0.5
(package
(name "rust-tokio-rusqlite")
(version "0.5.1")
(source
(origin
(method url-fetch)
(uri (crate-uri "tokio-rusqlite" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "09xihas30j72dda5pi3hw5693y79ffby7bs9cpy8kw144iqmzk62"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs (("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
("rust-rusqlite" ,rust-rusqlite-0.31)
("rust-tokio" ,rust-tokio-1))))
(home-page "https://github.com/programatik29/tokio-rusqlite")
(synopsis "Asynchronous handle for rusqlite library")
(description
"This package provides Asynchronous handle for rusqlite library.")
(license license:expat)))
(define-public rust-size-format-1
(package
(name "rust-size-format")
(version "1.0.2")
(source
(origin
(method url-fetch)
(uri (crate-uri "size_format" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0fxjl0rc0x7yc14x885dh7jjf2jrlhpwf66akp3dxii246mzdmbf"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs (("rust-generic-array" ,rust-generic-array-0.12)
("rust-num" ,rust-num-0.2))))
(home-page "https://github.com/aticu/size_format")
(synopsis "Allows for easier formatting of sizes")
(description
"This package provides Allows for easier formatting of sizes.")
(license (list license:expat license:asl2.0))))
(define-public rust-mime2ext-0.1
(package
(name "rust-mime2ext")
(version "0.1.53")
(source
(origin
(method url-fetch)
(uri (crate-uri "mime2ext" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0fmr2kbcyrxfp9glpplwx0x72p4szr9anhxh93l6bj36jvf66nji"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t))
(home-page "https://github.com/blyxxyz/mime2ext")
(synopsis "Given a mimetype, suggest a file extension")
(description
"This package provides Given a mimetype, suggest a file extension.")
(license license:expat)))
(define-public rust-json-comments-0.2
(package
(name "rust-json-comments")
(version "0.2.2")
(source
(origin
(method url-fetch)
(uri (crate-uri "json_comments" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0191qf6gaw3bcv13kx9xzwbfx71jv7gly5ds2l77bacvwpagxfwx"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t))
(home-page "https://github.com/tmccombs/json-comments-rs")
(synopsis "Library to strip comments from JSON before parsing")
(description
"This package provides Library to strip comments from JSON before parsing.")
(license license:asl2.0)))
(define-public rust-dyn-clonable-impl-0.9
(package
(name "rust-dyn-clonable-impl")
(version "0.9.2")
(source
(origin
(method url-fetch)
(uri (crate-uri "dyn-clonable-impl" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0fi1fy6r2zaq88n21yszlcdbm66iz3xi2dbgl8vrm5sq83ap31ky"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs (("rust-proc-macro2" ,rust-proc-macro2-1)
("rust-quote" ,rust-quote-1)
("rust-syn" ,rust-syn-2))))
(home-page "https://github.com/kardeiz/objekt-clonable")
(synopsis "Attribute wrapper for dyn-clone")
(description "This package provides Attribute wrapper for dyn-clone.")
(license license:expat)))
(define-public rust-dyn-clonable-0.9
(package
(name "rust-dyn-clonable")
(version "0.9.2")
(source
(origin
(method url-fetch)
(uri (crate-uri "dyn-clonable" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "01885xap4dmln3yspzyr0mmcwnm9mdhlp80ag0iig3nmpywznvm3"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs (("rust-dyn-clonable-impl" ,rust-dyn-clonable-impl-0.9)
("rust-dyn-clone" ,rust-dyn-clone-1))))
(home-page "https://github.com/kardeiz/objekt-clonable")
(synopsis "Attribute wrapper for dyn-clone")
(description "This package provides Attribute wrapper for dyn-clone.")
(license license:expat)))
(define-public rust-async-zip-0.0.12
(package
(name "rust-async-zip")
(version "0.0.12")
(source
(origin
(method url-fetch)
(uri (crate-uri "async_zip" version))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1l1l6iyg8hkbnjilj50vndn9ln4l6dav10ywvawh6qlwvd15245j"))))
(build-system cargo-build-system)
(arguments
`(#:skip-build? #t
#:cargo-inputs (("rust-async-compression" ,rust-async-compression-0.3)
("rust-chrono" ,rust-chrono-0.4)
("rust-crc32fast" ,rust-crc32fast-1)
("rust-log" ,rust-log-0.4)
("rust-pin-project" ,rust-pin-project-1)
("rust-thiserror" ,rust-thiserror-1)
("rust-tokio" ,rust-tokio-1))))
(home-page "https://github.com/Majored/rs-async-zip")
(synopsis "An asynchronous ZIP archive reading/writing crate")
(description
"This package provides An asynchronous ZIP archive reading/writing crate.")
(license license:expat)))
(define-public ripgrep-all
(let ((wrap-paths
(list ffmpeg
pandoc
poppler
ripgrep
zip
fzf)))
(package
(name "ripgrep-all")
(version "0.10.6")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/phiresky/ripgrep-all")
(commit (string-append "v" version))))
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "0ws0shf0y5z8wxaanlwjrpq604saffj1gr5jsfmvs6r2p4px3kly"))
(snippet
#~(begin (use-modules (guix build utils))
(substitute* "Cargo.toml"
(("0\\.30\\.0") "0.31.0")
(("git = .*,") ""))))))
(build-system cargo-build-system)
(native-inputs
`(,pkg-config ,xz ,@wrap-paths))
(inputs
(list
`(,zstd "lib")))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'wrap-with-paths
(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin-dir (string-append out "/bin/"))
(wrap-bin-folders (map (lambda (pkg)
(string-append pkg "/bin")) '#$wrap-paths))
(wrap-bin-path (string-join wrap-bin-folders ":")))
(for-each (lambda (bin)
(wrap-program bin
`("PATH" ":" prefix
(,wrap-bin-path)))) (find-files bin-dir))))))
#:cargo-test-flags
`(list
"--release" "--"
"--skip=adapters::mbox::tests::mail_simple"
"--skip=adapters::mbox::tests::mbox_simple"
"--skip=adapters::mbox::tests::mbox_attachment")
#:cargo-inputs
`(("rust-anyhow" ,rust-anyhow-1)
("rust-async-compression" ,rust-async-compression-0.4)
("rust-async-stream" ,rust-async-stream-0.3)
("rust-async-trait" ,rust-async-trait-0.1)
("rust-async-zip" ,rust-async-zip-0.0.12)
("rust-bincode" ,rust-bincode-1)
("rust-bytes" ,rust-bytes-1)
("rust-clap" ,rust-clap-4)
("rust-crossbeam" ,rust-crossbeam-0.8)
("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
("rust-derive-more" ,rust-derive-more-0.99)
("rust-directories-next" ,rust-directories-next-2)
("rust-dyn-clonable" ,rust-dyn-clonable-0.9)
("rust-dyn-clone" ,rust-dyn-clone-1)
("rust-encoding-rs" ,rust-encoding-rs-0.8)
("rust-encoding-rs-io" ,rust-encoding-rs-io-0.1)
("rust-env-logger" ,rust-env-logger-0.10)
("rust-glob" ,rust-glob-0.3)
("rust-json-comments" ,rust-json-comments-0.2)
("rust-lazy-static" ,rust-lazy-static-1)
("rust-log" ,rust-log-0.4)
("rust-mailparse" ,rust-mailparse-0.14)
("rust-memchr" ,rust-memchr-2)
("rust-mime2ext" ,rust-mime2ext-0.1)
("rust-paste" ,rust-paste-1)
("rust-path-clean" ,rust-path-clean-1)
("rust-pretty-bytes" ,rust-pretty-bytes-0.2)
("rust-regex" ,rust-regex-1)
("rust-rusqlite" ,rust-rusqlite-0.31)
("rust-schemars" ,rust-schemars-0.8)
("rust-serde" ,rust-serde-1)
("rust-serde-json" ,rust-serde-json-1)
("rust-size-format" ,rust-size-format-1)
("rust-structopt" ,rust-structopt-0.3)
("rust-tempfile" ,rust-tempfile-3)
("rust-tokio" ,rust-tokio-1)
("rust-tokio-rusqlite" ,rust-tokio-rusqlite-0.5)
("rust-tokio-stream" ,rust-tokio-stream-0.1)
("rust-tokio-tar" ,rust-tokio-tar-0.3)
("rust-tokio-util" ,rust-tokio-util-0.7)
("rust-tree-magic-mini" ,rust-tree-magic-mini-3))
#:cargo-development-inputs
`(("rust-async-recursion" ,rust-async-recursion-1)
("rust-ctor" ,rust-ctor-0.2)
("rust-pretty-assertions" ,rust-pretty-assertions-1)
("rust-tempfile" ,rust-tempfile-3)
("rust-tokio-test" ,rust-tokio-test-0.4))))
(home-page "https://github.com/phiresky/ripgrep-all")
(synopsis
"rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc")
(description
"This package provides rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz,
etc.")
(license license:agpl3+))))