From 2c01eabdec354262740dc2acf16d4767a314eb79 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Thu, 7 Mar 2024 02:33:58 +0300 Subject: [PATCH] atuin: add --- README.org | 1 + atuin-bin.scm | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 atuin-bin.scm diff --git a/README.org b/README.org index 0700b02..986d923 100644 --- a/README.org +++ b/README.org @@ -27,6 +27,7 @@ I'll probably push what I can upstream when I figure Guix out. | [[https://gohugo.io/][hugo-extended]] | Works | Installation from binaries | | [[https://github.com/mamba-org/mamba][micromamba]] | Works | Installation from binaries | | [[https://github.com/ClementTsang/bottom][bottom]] | Works | Installation from binaries | +| [[https://github.com/atuinsh/atuin][atuin]] | Works | Installation from binaries | | [[https://github.com/atreyasha/i3-balance-workspace][i3-balance-workspace]] | Works | Tests fail | | [[https://github.com/tmux-python/tmuxp][tmuxp]] | Works | Tests fail | | [[https://github.com/hroptatyr/dateutils][dateutils]] | Works | Tests fail | diff --git a/atuin-bin.scm b/atuin-bin.scm new file mode 100644 index 0000000..f22117f --- /dev/null +++ b/atuin-bin.scm @@ -0,0 +1,57 @@ +(define-module (atuin-bin) + #:use-module (ice-9 string-fun) + #:use-module (gnu packages base) + #:use-module (gnu packages curl) + #:use-module (gnu packages version-control) + #:use-module (gnu packages xorg) + #:use-module (gnu packages tls) + #:use-module (gnu packages compression) + #:use-module (gnu packages gcc) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (nonguix build-system binary)) + +(define libstdc++ + ;; Libstdc++ matching the default GCC. + (make-libstdc++ gcc)) + +(define-public atuin-bin + (package + (name "atuin-bin") + (version "18.0.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/atuinsh/atuin/releases/download/v" version + "/atuin-v" version "-x86_64-unknown-linux-gnu.tar.gz")) + (sha256 + (base32 + "1pk8jchf6kxa01qbv3amzwwkj0fxc35yv446igc1h6z870yanj58")))) + (build-system binary-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'binary-unpack) + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (invoke "tar" "xvzf" (assoc-ref inputs "source") + "--strip-components" "1")))) + #:install-plan + `(("atuin" "/bin/") + ("completions/atuin.fish" "/share/fish/vendor_completions.d/") + ("completions/atuin.bash" "/share/bash-completion/completions/") + ("completions/_atuin" "/share/zsh/site-functions/")) + #:patchelf-plan + `(("atuin" ("glibc" "libgccjit" "libstdc++"))))) + (inputs + `(("curl" ,curl) + ("libgccjit" ,libgccjit) + ("libstdc++" ,libstdc++) + ("glibc" ,glibc) + ("zlib" ,zlib))) + (synopsis "Sync, search and backup shell history") + (description "Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands. Additionally, it provides optional and fully encrypted synchronisation of your history between machines, via an Atuin server.") + (home-page "https://atuin.sh/") + (license license:expat)))