1(define-module (nmeum packages misc)2 #:use-module (nmeum packages)3 #:use-module (guix)4 #:use-module (guix build-system cargo)5 #:use-module (guix build-system copy)6 #:use-module (guix build-system gnu)7 #:use-module (guix build-system go)8 #:use-module (guix git-download)9 #:use-module ((guix licenses) #:prefix license:)10 #:use-module (gnu packages base)11 #:use-module (gnu packages bash)12 #:use-module (gnu packages gnupg)13 #:use-module (gnu packages golang-xyz)14 #:use-module (gnu packages mail)15 #:use-module (gnu packages perl)16 #:use-module (gnu packages pkg-config)17 #:use-module (gnu packages shells)18 #:use-module (gnu packages sqlite)19 #:use-module (gnu packages tree-sitter)20 #:use-module (gnu packages version-control)21 #:use-module (gnu packages vim)22 #:use-module (srfi srfi-26))2324;; TODO: This cannot be properly used with Guix right now because25;; gnu/system/keyboard.scm unconditionally generates the keyboard26;; console-keymap from xkeyboard-config.27(define-public neo-layout28 (let ((commit "97cfdd486dcd278833b80dc396e00a1c3503e6d6")29 (revision "1"))30 (package31 (name "neo-layout")32 (version (git-version "20220410" revision commit))33 (source34 (origin35 (method git-fetch)36 (uri (git-reference37 (url "https://git.neo-layout.org/neo/neo-layout.git")38 (commit commit)))39 (file-name (git-file-name name version))40 (sha25641 (base32 "0xg3n808rphn9jlpvgc4y1pz8kdjv916xshg64lkp4hakip1p45j"))))42 (build-system copy-build-system)43 (arguments44 `(#:install-plan45 '(("linux/console/neo.map" "usr/share/keymaps/legacy/i386/qwertz/neo.map"))))46 (home-page "https://neo-layout.org")47 (synopsis "Keyboard layout optimized for the German language")48 (description "This provides the original handwritten version of the49neo-layout for kbd's @code{loadkeys(1)}. Contrary to the version generated50from xkeyboard-config, layer 4 actually works.")51 (license license:gpl3))))5253(define-public mblaze-ui54 (package55 (name "mblaze-ui")56 (version "0.0.0-20250423085554-54f778f3d6a8")57 (source58 (origin59 (method git-fetch)60 (uri (git-reference61 (url "https://git.8pit.net/mblaze-ui.git")62 (commit (go-version->git-ref version))))63 (file-name (git-file-name name version))64 (sha25665 (base32 "104fjj7da2cp2f6g8h4y6ycs68ml8smiq11clx3dc07y191mnzf1"))))66 (build-system go-build-system)67 (arguments68 (list69 #:install-source? #f70 #:import-path "github.com/nmeum/mblaze-ui"))71 (native-inputs (list mblaze72 go-github-com-mattn-go-runewidth73 go-github-com-gdamore-tcell-v2))74 (home-page "https://github.com/nmeum/mblaze-ui")75 (synopsis "mblaze-ui")76 (description "")77 (license license:gpl3+)))7879(define-public git-shuffle80 (let ((commit "06ac27513a275c979aa57cd8c932b90c8cb689eb")81 (revision "1"))82 (package83 (name "git-shuffle")84 (version (git-version "20251025" revision commit))85 (source86 (origin87 (method git-fetch)88 (uri (git-reference89 (url "https://git.8pit.net/git-shuffle.git")90 (commit commit)))91 (file-name (git-file-name name version))92 (sha25693 (base32 "1say9ap60l04i3lj4gbf0dn6zbf457cf5fdvlwdh4y7rfi8hq3m0"))))94 (build-system gnu-build-system)95 (arguments96 (list97 #:tests? #f98 #:make-flags99 #~(list "CFLAGS=-O2"100 "PREFIX=/"101 (string-append "DESTDIR=" #$output)102 (string-append "CC=" #$(cc-for-target)))103 #:phases104 #~(modify-phases %standard-phases105 (delete 'configure))))106 (inputs (list pkg-config))107 (native-inputs (list libgit2))108 (home-page "https://git.8pit.net/git-shuffle")109 (synopsis "Randomize timestamps associated with Git commits to enhance privacy")110 (description "")111 (license license:gpl3))))112113;; TODO: Use package-with-extra-patches somehow, however, we need to change114;; the package name somehow as loksh would otherwise be ambiguous and not115;; sure how do that on a package returned by package-with-extra-patches.116(define-public loksh-8pit117 (package118 (inherit loksh)119 (name "loksh-8pit")120 (source121 (origin122 (inherit (package-source loksh))123 (patches (nmeum-patches124 "loksh-bracketed-paste-mode.patch"125 "loksh-kshbasename.patch"))))))126127;; XXX: https://codeberg.org/guix/guix/pulls/6295128(define-public neovim-8pit129 (package130 (inherit neovim)131 (name "neovim-8pit")132 (source133 (origin134 (inherit (package-source neovim))135 (patches (nmeum-patches "neovim-tree-sitter-grammar-path.patch"))))136 (propagated-inputs137 ;; bundled tree-sitters, neovim assumes that these are available.138 ;; See https://neovim.io/doc/user/treesitter.html#treesitter-parsers139 (list tree-sitter-c tree-sitter-lua tree-sitter-markdown140 ;; TODO: tree-sitter-vimscript141 tree-sitter-vimdoc))142 (native-search-paths143 (list (search-path-specification144 (variable "TREE_SITTER_GRAMMAR_PATH")145 (files '("lib/tree-sitter")))))))146147(define-public tpm148 (package149 (name "tpm")150 (version "1.3.3")151 (source152 (origin153 (method git-fetch)154 (uri (git-reference155 (url "https://git.8pit.net/tpm.git")156 (commit version)))157 (file-name (git-file-name name version))158 (sha256159 (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))160 (build-system gnu-build-system)161 (arguments162 (list163 #:tests? #f164 #:make-flags165 #~(list "PREFIX=/"166 (string-append "DESTDIR=" #$output))167 #:phases168 #~(modify-phases %standard-phases169 (add-after 'unpack 'fix-paths170 (lambda* (#:key inputs outputs #:allow-other-keys)171 (substitute* "tpm"172 (("gpg2")173 (search-input-file inputs "/bin/gpg")))))174 (delete 'configure))))175 (inputs (list gnupg))176 (native-inputs (list perl))177 (home-page "https://git.8pit.net/tpm")178 (synopsis "Tiny password manager")179 (description180 "Tiny shell script which is heavily inspired and largely181compatible with @code{pass}. Just like pass it uses @code{gnupg} to securely182store your passwords, the major difference between pass and tpm is that the183latter is a lot more minimal.")184 (license license:gpl3)))185186(define-public pimsync187 (package188 (name "pimsync")189 (version "0.5.6")190 (source191 (origin192 (method git-fetch)193 (uri (git-reference194 (url "https://git.sr.ht/~whynothugo/pimsync")195 (commit (string-append "v" version))))196 (file-name (git-file-name name version))197 (sha256198 (base32 "01qxg0mk7if96rmb0q88wgjpnv1fb8iw2dbzwlm0ars1mi3xpmr3"))))199 (build-system cargo-build-system)200 (arguments201 (list #:install-source? #f202 #:phases203 #~(modify-phases %standard-phases204 (add-after 'unpack 'setup-environment205 (lambda _206 (setenv "PIMSYNC_VERSION" #$version)))207 (add-after 'install 'install-man-pages208 (lambda _209 (let ((man (string-append #$output "/share/man/man")))210 (install-file "pimsync.1" (string-append man "1"))211 (install-file "pimsync.conf.5" (string-append man "5"))212 (install-file "pimsync-migration.7" (string-append man "7"))))))))213 (inputs (cons* sqlite (cargo-inputs 'pimsync #:module '(nmeum packages rust-crates))))214 (synopsis "Synchronize calendars and contacts using CalDAV, CardDAV and others")215 (description "pimsync synchronizes your calendars and contacts between two216storage locations. The most popular purpose is to synchronize a CalDAV or217CardDAV server with a local folder or file.")218 (home-page "https://pimsync.whynothugo.nl/")219 (license license:eupl1.2)))220221(define-public go-webdav222 (package/inherit go-github-com-emersion-go-webdav223 (name "go-webdav")224 (arguments225 (substitute-keyword-arguments226 (package-arguments go-github-com-emersion-go-webdav)227 ((#:tests? _ #t) #f)228 ((#:install-source? _ #t) #f)229 ((#:import-path _ "github.com/emersion/go-webdav") "github.com/emersion/go-webdav/cmd/webdav-server")230 ((#:unpack-path _ "") "github.com/emersion/go-webdav")))231 (native-inputs (package-propagated-inputs go-github-com-emersion-go-webdav))232 (propagated-inputs '())233 (inputs '())))234235(define-public archive-mail236 (package237 (name "archive-mail")238 (version "v0.0.0-20260103100740-0b0c03251191")239 (source240 (origin241 (method git-fetch)242 (uri (git-reference243 (url "https://git.8pit.net/archive-mail.git")244 (commit (go-version->git-ref version))))245 (file-name (git-file-name name version))246 (sha256247 (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))248 (build-system go-build-system)249 (arguments250 (list251 #:install-source? #f252 #:import-path "github.com/nmeum/archive-mail"253 #:phases254 #~(modify-phases %standard-phases255 (replace 'check256 (lambda* (#:key tests? import-path #:allow-other-keys)257 (when tests?258 (with-directory-excursion (string-append "src/" import-path "/tests")259 (setenv "ARCHIVE_MAIL" (in-vicinity (getenv "GOBIN") "archive-mail"))260 (invoke "./run_tests.sh"))))))))261 (inputs (list bash-minimal diffutils))262 (home-page "https://git.8pit.net/archive-logs")263 (synopsis "archive-mail")264 (description "")265 (license license:gpl3+)))266267(define-public archive-logs268 (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")269 (revision "0"))270 (package271 (name "archive-logs")272 (version (git-version "20211124" revision commit))273 (source274 (origin275 (method git-fetch)276 (uri (git-reference277 (url "https://git.8pit.net/archive-logs.git")278 (commit commit)))279 (file-name (git-file-name name version))280 (sha256281 (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))282 (build-system gnu-build-system)283 (arguments284 (list285 #:test-target "check"286 #:make-flags287 #~(list "CFLAGS=-O2"288 "HAVE_SENDFILE=1"289 "PREFIX=/"290 (string-append "DESTDIR=" #$output)291 (string-append "CC=" #$(cc-for-target)))292 #:phases293 #~(modify-phases %standard-phases294 (delete 'configure))))295 (inputs (list bash-minimal))296 (home-page "https://git.8pit.net/archive-logs")297 (synopsis "Iteratively archive newline separated log files")298 (description "")299 (license license:gpl3))))