1(define-module (nmeum packages misc)2 #:use-module (guix)3 #:use-module (guix build-system cargo)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 sqlite)18 #:use-module (gnu packages version-control)19 #:use-module (srfi srfi-26))2021;; TODO: This cannot be properly used with Guix right now because22;; gnu/system/keyboard.scm unconditionally generates the keyboard23;; console-keymap from xkeyboard-config.24(define-public neo-layout25 (let ((commit "97cfdd486dcd278833b80dc396e00a1c3503e6d6")26 (revision "1"))27 (package28 (name "neo-layout")29 (version (git-version "20220410" revision commit))30 (source31 (origin32 (method git-fetch)33 (uri (git-reference34 (url "https://git.neo-layout.org/neo/neo-layout.git")35 (commit commit)))36 (file-name (git-file-name name version))37 (sha25638 (base32 "0xg3n808rphn9jlpvgc4y1pz8kdjv916xshg64lkp4hakip1p45j"))))39 (build-system copy-build-system)40 (arguments41 `(#:install-plan42 '(("linux/console/neo.map" "usr/share/keymaps/legacy/i386/qwertz/neo.map"))))43 (home-page "https://neo-layout.org")44 (synopsis "Keyboard layout optimized for the German language")45 (description "This provides the original handwritten version of the46neo-layout for kbd's @code{loadkeys(1)}. Contrary to the version generated47from xkeyboard-config, layer 4 actually works.")48 (license license:gpl3))))4950(define-public mblaze-ui51 (package52 (name "mblaze-ui")53 (version "0.0.0-20250423085554-54f778f3d6a8")54 (source55 (origin56 (method git-fetch)57 (uri (git-reference58 (url "https://git.8pit.net/mblaze-ui.git")59 (commit (go-version->git-ref version))))60 (file-name (git-file-name name version))61 (sha25662 (base32 "104fjj7da2cp2f6g8h4y6ycs68ml8smiq11clx3dc07y191mnzf1"))))63 (build-system go-build-system)64 (arguments65 (list66 #:install-source? #f67 #:import-path "github.com/nmeum/mblaze-ui"))68 (native-inputs (list mblaze69 go-github-com-mattn-go-runewidth70 go-github-com-gdamore-tcell-v2))71 (home-page "https://github.com/nmeum/mblaze-ui")72 (synopsis "mblaze-ui")73 (description "")74 (license license:gpl3+)))7576(define-public git-shuffle77 (let ((commit "06ac27513a275c979aa57cd8c932b90c8cb689eb")78 (revision "1"))79 (package80 (name "git-shuffle")81 (version (git-version "20251025" revision commit))82 (source83 (origin84 (method git-fetch)85 (uri (git-reference86 (url "https://git.8pit.net/git-shuffle.git")87 (commit commit)))88 (file-name (git-file-name name version))89 (sha25690 (base32 "1say9ap60l04i3lj4gbf0dn6zbf457cf5fdvlwdh4y7rfi8hq3m0"))))91 (build-system gnu-build-system)92 (arguments93 (list94 #:tests? #f95 #:make-flags96 #~(list "CFLAGS=-O2"97 "PREFIX=/"98 (string-append "DESTDIR=" #$output)99 (string-append "CC=" #$(cc-for-target)))100 #:phases101 #~(modify-phases %standard-phases102 (delete 'configure))))103 (inputs (list pkg-config))104 (native-inputs (list libgit2))105 (home-page "https://git.8pit.net/git-shuffle")106 (synopsis "Randomize timestamps associated with Git commits to enhance privacy")107 (description "")108 (license license:gpl3))))109110;; TODO: Use package-with-extra-patches somehow, however, we need to change111;; the package name somehow as loksh would otherwise be ambiguous and not112;; sure how do that on a package returned by package-with-extra-patches.113(define-public loksh-8pit114 (package115 (inherit loksh)116 (name "loksh-8pit")117 (source118 (origin119 (inherit (package-source loksh))120 (patches (map (lambda (patch)121 (search-path (map (cut string-append <>122 "/nmeum/packages/patches")123 %load-path) patch))124 '("loksh-bracketed-paste-mode.patch"125 "loksh-kshbasename.patch")))))))126127(define-public tpm128 (package129 (name "tpm")130 (version "1.3.3")131 (source132 (origin133 (method git-fetch)134 (uri (git-reference135 (url "https://git.8pit.net/tpm.git")136 (commit version)))137 (file-name (git-file-name name version))138 (sha256139 (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))140 (build-system gnu-build-system)141 (arguments142 (list143 #:tests? #f144 #:make-flags145 #~(list "PREFIX=/"146 (string-append "DESTDIR=" #$output))147 #:phases148 #~(modify-phases %standard-phases149 (add-after 'unpack 'fix-paths150 (lambda* (#:key inputs outputs #:allow-other-keys)151 (substitute* "tpm"152 (("gpg2")153 (search-input-file inputs "/bin/gpg")))))154 (delete 'configure))))155 (inputs (list gnupg))156 (native-inputs (list perl))157 (home-page "https://git.8pit.net/tpm")158 (synopsis "Tiny password manager")159 (description160 "Tiny shell script which is heavily inspired and largely161compatible with @code{pass}. Just like pass it uses @code{gnupg} to securely162store your passwords, the major difference between pass and tpm is that the163latter is a lot more minimal.")164 (license license:gpl3)))165166(define-public pimsync167 (package168 (name "pimsync")169 (version "0.5.2")170 (source171 (origin172 (method git-fetch)173 (uri (git-reference174 (url "https://git.sr.ht/~whynothugo/pimsync")175 (commit (string-append "v" version))))176 (file-name (git-file-name name version))177 (sha256178 (base32 "0r8ph1gra5d9wb06c8khcz0rpjak2dcpvkvdm7aj55gdvcnx4v9d"))))179 (build-system cargo-build-system)180 (arguments181 (list #:install-source? #f182 #:phases183 #~(modify-phases %standard-phases184 ;; XXX: Forcefully disable experimental jmap support as it185 ;; introduces a dependency on jmap-tools which does not compile186 ;; with rustc-1.85.1 due to utilization of unstable rustc187 ;; features. Can be removed once we upgrade to rustc-1.86.X.188 (add-after 'unpack 'disable-jmap189 (lambda _190 (substitute* "Cargo.toml"191 ((".*jmap.*") ""))))192 (add-after 'unpack 'setup-environment193 (lambda _194 (setenv "PIMSYNC_VERSION" #$version)))195 (add-after 'install 'install-man-pages196 (lambda _197 (let ((man (string-append #$output "/share/man/man")))198 (install-file "pimsync.1" (string-append man "1"))199 (install-file "pimsync.conf.5" (string-append man "5"))200 (install-file "pimsync-migration.7" (string-append man "7"))))))))201 (inputs (cons* sqlite (cargo-inputs 'pimsync #:module '(nmeum packages rust-crates))))202 (synopsis "Synchronize calendars and contacts using CalDAV, CardDAV and others")203 (description "pimsync synchronizes your calendars and contacts between two204storage locations. The most popular purpose is to synchronize a CalDAV or205CardDAV server with a local folder or file.")206 (home-page "https://pimsync.whynothugo.nl/")207 (license license:eupl1.2)))208209(define-public go-webdav210 (package/inherit go-github-com-emersion-go-webdav211 (name "go-webdav")212 (arguments213 (substitute-keyword-arguments214 (package-arguments go-github-com-emersion-go-webdav)215 ((#:tests? _ #t) #f)216 ((#:install-source? _ #t) #f)217 ((#:import-path _ "github.com/emersion/go-webdav") "github.com/emersion/go-webdav/cmd/webdav-server")218 ((#:unpack-path _ "") "github.com/emersion/go-webdav")))219 (native-inputs (package-propagated-inputs go-github-com-emersion-go-webdav))220 (propagated-inputs '())221 (inputs '())))222223(define-public archive-mail224 (package225 (name "archive-mail")226 (version "v0.0.0-20260103100740-0b0c03251191")227 (source228 (origin229 (method git-fetch)230 (uri (git-reference231 (url "https://git.8pit.net/archive-mail.git")232 (commit (go-version->git-ref version))))233 (file-name (git-file-name name version))234 (sha256235 (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))236 (build-system go-build-system)237 (arguments238 (list239 #:install-source? #f240 #:import-path "github.com/nmeum/archive-mail"241 #:phases242 #~(modify-phases %standard-phases243 (replace 'check244 (lambda* (#:key tests? import-path #:allow-other-keys)245 (when tests?246 (with-directory-excursion (string-append "src/" import-path "/tests")247 (setenv "ARCHIVE_MAIL" (in-vicinity (getenv "GOBIN") "archive-mail"))248 (invoke "./run_tests.sh"))))))))249 (inputs (list bash-minimal diffutils))250 (home-page "https://git.8pit.net/archive-logs")251 (synopsis "archive-mail")252 (description "")253 (license license:gpl3+)))254255(define-public archive-logs256 (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")257 (revision "0"))258 (package259 (name "archive-logs")260 (version (git-version "20211124" revision commit))261 (source262 (origin263 (method git-fetch)264 (uri (git-reference265 (url "https://git.8pit.net/archive-logs.git")266 (commit commit)))267 (file-name (git-file-name name version))268 (sha256269 (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))270 (build-system gnu-build-system)271 (arguments272 (list273 #:test-target "check"274 #:make-flags275 #~(list "CFLAGS=-O2"276 "HAVE_SENDFILE=1"277 "PREFIX=/"278 (string-append "DESTDIR=" #$output)279 (string-append "CC=" #$(cc-for-target)))280 #:phases281 #~(modify-phases %standard-phases282 (delete 'configure))))283 (inputs (list bash-minimal))284 (home-page "https://git.8pit.net/archive-logs")285 (synopsis "Iteratively archive newline separated log files")286 (description "")287 (license license:gpl3))))