1(define-module (nmeum packages misc)2 #:use-module (nmeum packages)3 #:use-module (guix)4 #:use-module (guix build-system copy)5 #:use-module (guix build-system gnu)6 #:use-module (guix build-system go)7 #:use-module (guix git-download)8 #:use-module ((guix licenses) #:prefix license:)9 #:use-module (gnu packages base)10 #:use-module (gnu packages bash)11 #:use-module (gnu packages gnupg)12 #:use-module (gnu packages golang-xyz)13 #:use-module (gnu packages mail)14 #:use-module (gnu packages perl)15 #:use-module (gnu packages pkg-config)16 #:use-module (gnu packages shells)17 #:use-module (gnu packages tree-sitter)18 #:use-module (gnu packages version-control)19 #:use-module (gnu packages vim)20 #:use-module (srfi srfi-26))2122;; TODO: This cannot be properly used with Guix right now because23;; gnu/system/keyboard.scm unconditionally generates the keyboard24;; console-keymap from xkeyboard-config.25(define-public neo-layout26 (let ((commit "97cfdd486dcd278833b80dc396e00a1c3503e6d6")27 (revision "1"))28 (package29 (name "neo-layout")30 (version (git-version "20220410" revision commit))31 (source32 (origin33 (method git-fetch)34 (uri (git-reference35 (url "https://git.neo-layout.org/neo/neo-layout.git")36 (commit commit)))37 (file-name (git-file-name name version))38 (sha25639 (base32 "0xg3n808rphn9jlpvgc4y1pz8kdjv916xshg64lkp4hakip1p45j"))))40 (build-system copy-build-system)41 (arguments42 `(#:install-plan43 '(("linux/console/neo.map" "usr/share/keymaps/legacy/i386/qwertz/neo.map"))))44 (home-page "https://neo-layout.org")45 (synopsis "Keyboard layout optimized for the German language")46 (description "This provides the original handwritten version of the47neo-layout for kbd's @code{loadkeys(1)}. Contrary to the version generated48from xkeyboard-config, layer 4 actually works.")49 (license license:gpl3))))5051(define-public mblaze-ui52 (package53 (name "mblaze-ui")54 (version "0.0.0-20250423085554-54f778f3d6a8")55 (source56 (origin57 (method git-fetch)58 (uri (git-reference59 (url "https://git.8pit.net/mblaze-ui.git")60 (commit (go-version->git-ref version))))61 (file-name (git-file-name name version))62 (sha25663 (base32 "104fjj7da2cp2f6g8h4y6ycs68ml8smiq11clx3dc07y191mnzf1"))))64 (build-system go-build-system)65 (arguments66 (list67 #:install-source? #f68 #:import-path "github.com/nmeum/mblaze-ui"))69 (native-inputs (list mblaze70 go-github-com-mattn-go-runewidth71 go-github-com-gdamore-tcell-v2))72 (home-page "https://github.com/nmeum/mblaze-ui")73 (synopsis "mblaze-ui")74 (description "")75 (license license:gpl3+)))7677(define-public git-shuffle78 (let ((commit "06ac27513a275c979aa57cd8c932b90c8cb689eb")79 (revision "1"))80 (package81 (name "git-shuffle")82 (version (git-version "20251025" revision commit))83 (source84 (origin85 (method git-fetch)86 (uri (git-reference87 (url "https://git.8pit.net/git-shuffle.git")88 (commit commit)))89 (file-name (git-file-name name version))90 (sha25691 (base32 "1say9ap60l04i3lj4gbf0dn6zbf457cf5fdvlwdh4y7rfi8hq3m0"))))92 (build-system gnu-build-system)93 (arguments94 (list95 #:tests? #f96 #:make-flags97 #~(list "CFLAGS=-O2"98 "PREFIX=/"99 (string-append "DESTDIR=" #$output)100 (string-append "CC=" #$(cc-for-target)))101 #:phases102 #~(modify-phases %standard-phases103 (delete 'configure))))104 (inputs (list pkg-config))105 (native-inputs (list libgit2))106 (home-page "https://git.8pit.net/git-shuffle")107 (synopsis "Randomize timestamps associated with Git commits to enhance privacy")108 (description "")109 (license license:gpl3))))110111;; TODO: Use package-with-extra-patches somehow, however, we need to change112;; the package name somehow as loksh would otherwise be ambiguous and not113;; sure how do that on a package returned by package-with-extra-patches.114(define-public loksh-8pit115 (package116 (inherit loksh)117 (name "loksh-8pit")118 (source119 (origin120 (inherit (package-source loksh))121 (patches (nmeum-patches122 "loksh-bracketed-paste-mode.patch"123 "loksh-kshbasename.patch"))))))124125;; XXX: https://codeberg.org/guix/guix/pulls/6295126(define-public neovim-8pit127 (package128 (inherit neovim)129 (name "neovim-8pit")130 (source131 (origin132 (inherit (package-source neovim))133 (patches (nmeum-patches "neovim-tree-sitter-grammar-path.patch"))))134 (propagated-inputs135 ;; bundled tree-sitters, neovim assumes that these are available.136 ;; See https://neovim.io/doc/user/treesitter.html#treesitter-parsers137 (list tree-sitter-c tree-sitter-lua tree-sitter-markdown138 ;; TODO: tree-sitter-vimscript139 tree-sitter-vimdoc))140 (native-search-paths141 (list (search-path-specification142 (variable "TREE_SITTER_GRAMMAR_PATH")143 (files '("lib/tree-sitter")))))))144145(define-public tpm146 (package147 (name "tpm")148 (version "1.3.3")149 (source150 (origin151 (method git-fetch)152 (uri (git-reference153 (url "https://git.8pit.net/tpm.git")154 (commit version)))155 (file-name (git-file-name name version))156 (sha256157 (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))158 (build-system gnu-build-system)159 (arguments160 (list161 #:tests? #f162 #:make-flags163 #~(list "PREFIX=/"164 (string-append "DESTDIR=" #$output))165 #:phases166 #~(modify-phases %standard-phases167 (add-after 'unpack 'fix-paths168 (lambda* (#:key inputs outputs #:allow-other-keys)169 (substitute* "tpm"170 (("gpg2")171 (search-input-file inputs "/bin/gpg")))))172 (delete 'configure))))173 (inputs (list gnupg))174 (native-inputs (list perl))175 (home-page "https://git.8pit.net/tpm")176 (synopsis "Tiny password manager")177 (description178 "Tiny shell script which is heavily inspired and largely179compatible with @code{pass}. Just like pass it uses @code{gnupg} to securely180store your passwords, the major difference between pass and tpm is that the181latter is a lot more minimal.")182 (license license:gpl3)))183184(define-public archive-mail185 (package186 (name "archive-mail")187 (version "v0.0.0-20260103100740-0b0c03251191")188 (source189 (origin190 (method git-fetch)191 (uri (git-reference192 (url "https://git.8pit.net/archive-mail.git")193 (commit (go-version->git-ref version))))194 (file-name (git-file-name name version))195 (sha256196 (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))197 (build-system go-build-system)198 (arguments199 (list200 #:install-source? #f201 #:import-path "github.com/nmeum/archive-mail"202 #:phases203 #~(modify-phases %standard-phases204 (replace 'check205 (lambda* (#:key tests? import-path #:allow-other-keys)206 (when tests?207 (with-directory-excursion (string-append "src/" import-path "/tests")208 (setenv "ARCHIVE_MAIL" (in-vicinity (getenv "GOBIN") "archive-mail"))209 (invoke "./run_tests.sh"))))))))210 (inputs (list bash-minimal diffutils))211 (home-page "https://git.8pit.net/archive-logs")212 (synopsis "archive-mail")213 (description "")214 (license license:gpl3+)))215216(define-public archive-logs217 (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")218 (revision "0"))219 (package220 (name "archive-logs")221 (version (git-version "20211124" revision commit))222 (source223 (origin224 (method git-fetch)225 (uri (git-reference226 (url "https://git.8pit.net/archive-logs.git")227 (commit commit)))228 (file-name (git-file-name name version))229 (sha256230 (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))231 (build-system gnu-build-system)232 (arguments233 (list234 #:test-target "check"235 #:make-flags236 #~(list "CFLAGS=-O2"237 "HAVE_SENDFILE=1"238 "PREFIX=/"239 (string-append "DESTDIR=" #$output)240 (string-append "CC=" #$(cc-for-target)))241 #:phases242 #~(modify-phases %standard-phases243 (delete 'configure))))244 (inputs (list bash-minimal))245 (home-page "https://git.8pit.net/archive-logs")246 (synopsis "Iteratively archive newline separated log files")247 (description "")248 (license license:gpl3))))