From 8c30435504b5a2f0acc8e764404b869e2e1b3c88 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Wed, 25 Jan 2023 16:48:11 +0300 Subject: [PATCH] feat(jless): add --- README.org | 1 + jless.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 jless.scm diff --git a/README.org b/README.org index 7ab1cb5..8058834 100644 --- a/README.org +++ b/README.org @@ -17,6 +17,7 @@ I'll probably push what I can upstream when I figure Guix out. | [[https://github.com/fdw/rofimoji/][rofimoji]] | OK | But I had to create setup.py myself | | [[https://github.com/deajan/osync][osync]] | Works | Requires shell commands as propagated-inputs | | [[https://github.com/jdepoix/youtube-transcript-api][youtube-transcript-api]] | Works | Tests fail | +| [[https://github.com/PaulJuliusMartinez/jless][jless]] | Works | Installation from binaries | | [[https://github.com/latex-lsp/texlab/][texlab]] | Works | Installation from binaries | | [[https://gohugo.io/][hugo]] | Works | Installation from binaries | | [[https://www.nushell.sh/][nushell]] | Works | Installation from binaries (Guix version is outdated) | diff --git a/jless.scm b/jless.scm new file mode 100644 index 0000000..d5b3e25 --- /dev/null +++ b/jless.scm @@ -0,0 +1,40 @@ +(define-module (jless) + #:use-module (gnu packages base) + #:use-module (gnu packages compression) + #:use-module (gnu packages gcc) + #:use-module (gnu packages xorg) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (nonguix build-system binary)) + +(define-public jless-bin + (package + (name "jless-bin") + (version "0.8.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/PaulJuliusMartinez/jless/releases/download/v" + version "/" + "jless-v" version "-x86_64-unknown-linux-gnu.zip")) + (sha256 + (base32 + "0fb9f66qc8shrsv1lffsdq78hc9cb6bddhml5zhv5bcm9pds7q2l")))) + (build-system binary-build-system) + (arguments + `(#:install-plan + `(("jless" "/bin/")) + #:patchelf-plan + `(("jless" ("glibc" "libxcb" "gcc:lib"))))) + (inputs + `(("gcc:lib" ,gcc "lib") + ("glibc" ,glibc) + ("libxcb" ,libxcb))) + (native-inputs + `(("unzip" ,unzip))) + (synopsis "jless is a command-line JSON viewer designed for reading, exploring, and searching through JSON data") + (description "jless is a command-line JSON viewer. Use it as a replacement for whatever combination of less, jq, cat and your editor you currently use for viewing JSON files. It is written in Rust and can be installed as a single standalone binary.") + (home-page "https://github.com/PaulJuliusMartinez/jless") + (license license:expat)))