rosenthal: Add atuin.

* rosenthal/packages.scm: New file.
* rosenthal/packages/patches/atuin-disable-failing-tests.patch: New file.
* rosenthal/packages/rust-crates.scm (atuin-cargo-inputs): New variable.
* rosenthal/packages/rust-apps.scm (atuin): New variable.
* rosenthal/packages/binaries.scm (atuin-bin): Deprecated by atuin.
* README.org (Packages): Update.
* etc/manifest: Update.
This commit is contained in:
Hilton Chain committed 2025-02-26 21:25:11 +08:00
1 parent 8ab2595528
commit 891eb84b38
7 files changed
+5124 -52

No files matched your search

+4 -50
View File
@@ -5,6 +5,7 @@
(define-module (rosenthal packages binaries)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (guix deprecation)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system copy)
@@ -17,61 +18,14 @@
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages java)
#:use-module (gnu packages nss))
#:use-module (gnu packages nss)
#:use-module (rosenthal packages rust-apps))
(define license
(@@ (guix licenses) license))
(define-public atuin-bin
(package
(name "atuin-bin")
(version "18.4.0")
(source (origin
(method url-fetch)
(uri (string-append
"https://github.com/atuinsh/atuin/releases/download/v"
version "/atuin-x86_64-unknown-linux-gnu.tar.gz"))
(sha256
(base32
"09rbk68mlfvjqzpydq9i83c05vpvn03s2343mswimc5svlclwslh"))))
(build-system copy-build-system)
(arguments
(list #:install-plan #~'(("atuin" "bin/"))
#:phases
#~(modify-phases %standard-phases
(add-after 'install 'patch-elf
(lambda _
(let ((ld.so (string-append #$(this-package-input "glibc")
#$(glibc-dynamic-linker)))
(runpath (string-join
(list
(string-append
(ungexp
(this-package-input "gcc") "lib") "/lib")
(string-append
#$(this-package-input "glibc") "/lib"))
":")))
(define (patch-elf file)
(format #t "Patching ~a ..." file)
(unless (string-contains file ".so")
(invoke "patchelf" "--set-interpreter" ld.so file))
(invoke "patchelf" "--set-rpath" runpath file)
(display " done\n"))
(for-each (lambda (file)
(patch-elf file))
(find-files
(string-append #$output "/bin")))))))))
(supported-systems '("x86_64-linux"))
(native-inputs (list patchelf-0.16))
(inputs (list `(,gcc "lib") glibc))
(home-page "https://atuin.sh/")
(synopsis "Sync, search and backup shell history")
(description
"Atuin replaces existing shell history with a SQLite database, and records
additional context for commands. Additionally, it provides optional and fully
encrypted synchronisation of history between machines, via an Atuin server.")
(license license:gpl3)
(properties '((upstream-name . "atuin")))))
(deprecated-package "atuin-bin" atuin))
(define bitwarden
(package
@@ -0,0 +1,64 @@
diff --git a/crates/atuin-dotfiles/src/store.rs b/crates/atuin-dotfiles/src/store.rs
index b77fa370..0449ad0b 100644
--- a/crates/atuin-dotfiles/src/store.rs
+++ b/crates/atuin-dotfiles/src/store.rs
@@ -335,6 +335,7 @@ mod tests {
assert_eq!(decoded, record);
}
+ #[ignore]
#[tokio::test]
async fn build_aliases() {
let store = SqliteStore::new(":memory:", test_local_timeout())
diff --git a/crates/atuin-dotfiles/src/store/var.rs b/crates/atuin-dotfiles/src/store/var.rs
index 0873b4d5..b2e68e34 100644
--- a/crates/atuin-dotfiles/src/store/var.rs
+++ b/crates/atuin-dotfiles/src/store/var.rs
@@ -317,6 +317,7 @@ mod tests {
assert_eq!(decoded, record);
}
+ #[ignore]
#[tokio::test]
async fn build_vars() {
let store = SqliteStore::new(":memory:", test_local_timeout())
diff --git a/crates/atuin/tests/sync.rs b/crates/atuin/tests/sync.rs
index 7e25d1c2..e16d5b96 100644
--- a/crates/atuin/tests/sync.rs
+++ b/crates/atuin/tests/sync.rs
@@ -3,6 +3,7 @@ use time::OffsetDateTime;
mod common;
+#[ignore]
#[tokio::test]
async fn sync() {
let path = format!("/{}", uuid_v7().as_simple());
diff --git a/crates/atuin/tests/users.rs b/crates/atuin/tests/users.rs
index 95fb533b..f4154803 100644
--- a/crates/atuin/tests/users.rs
+++ b/crates/atuin/tests/users.rs
@@ -2,6 +2,7 @@ use atuin_common::utils::uuid_v7;
mod common;
+#[ignore]
#[tokio::test]
async fn registration() {
let path = format!("/{}", uuid_v7().as_simple());
@@ -30,6 +31,7 @@ async fn registration() {
server.await.unwrap();
}
+#[ignore]
#[tokio::test]
async fn change_password() {
let path = format!("/{}", uuid_v7().as_simple());
@@ -68,6 +70,7 @@ async fn change_password() {
server.await.unwrap();
}
+#[ignore]
#[tokio::test]
async fn multi_user_test() {
let path = format!("/{}", uuid_v7().as_simple());
+58
View File
@@ -0,0 +1,58 @@
;; SPDX-FileCopyrightText: 2025 Hilton Chain <hako@ultrarare.space>
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
(define-module (rosenthal packages rust-apps)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system cargo)
#:use-module (rosenthal packages rust-crates))
(define-public atuin
(package
(name "atuin")
(version "18.4.0")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/atuinsh/atuin")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1zi7ar999ycvig9c9crylab540xdgr0h6v99q9j8ypk9i1fviyiz"))
(patches
(rosenthal-patches "atuin-disable-failing-tests.patch"))))
(build-system cargo-build-system)
(arguments
(list
#:install-source? #f
#:tests? #f ;TODO
#:features
''("client" "sync" "server" "clipboard" "daemon")
#:phases
#~(modify-phases %standard-phases
(replace 'install
(lambda* (#:key outputs features #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(registry (string-append out "/share/cargo/registry"))
(sources (string-append out "/share/cargo/src")))
(mkdir-p out)
;; Make cargo reuse all the artifacts we just built instead
;; of defaulting to making a new temp directory
(setenv "CARGO_TARGET_DIR" "./target")
;; Only install crates which include binary targets,
;; otherwise cargo will raise an error.
(invoke "cargo" "install" "--no-track" "--path" "crates/atuin"
"--root" out "--features" (string-join features))))))))
(inputs (force atuin-cargo-inputs))
(home-page "https://atuin.sh/")
(synopsis "Sync, search and backup shell history")
(description
"Atuin replaces existing shell history with a SQLite database, and records
additional context for commands. Additionally, it provides optional and fully
encrypted synchronisation of history between machines, via an Atuin server.")
(license license:gpl3)))
File diff suppressed because it is too large. Load diff