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 c) #:select (simple-cc))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 tree-sitter)19 #:use-module (gnu packages version-control)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 webdav-server78 (package79 (name "webdav-server")80 (version "v0.0.0-20260424104841-60ba47890791")81 (source82 (origin83 (method git-fetch)84 (uri (git-reference85 (url "https://git.8pit.net/webdav-server.git")86 (commit (go-version->git-ref version))))87 (file-name (git-file-name name version))88 (sha25689 (base32 "1jp5k9y20lz9n0vwhaw5ivpqdqkam81lxdqb2gc9xx0k2jih6wpk"))))90 (build-system go-build-system)91 (arguments92 (list93 #:tests? #f94 #:install-source? #f95 #:import-path "git.8pit.net/webdav-server"))96 (native-inputs (list go-github-com-emersion-go-webdav))97 (home-page "https://git.8pit.net/webdav-server")98 (synopsis "Extremely simplistic WebDAV server built around go-webdav")99 (description "")100 (license license:expat)))101102(define-public git-shuffle103 (let ((commit "06ac27513a275c979aa57cd8c932b90c8cb689eb")104 (revision "1"))105 (package106 (name "git-shuffle")107 (version (git-version "20251025" revision commit))108 (source109 (origin110 (method git-fetch)111 (uri (git-reference112 (url "https://git.8pit.net/git-shuffle.git")113 (commit commit)))114 (file-name (git-file-name name version))115 (sha256116 (base32 "1say9ap60l04i3lj4gbf0dn6zbf457cf5fdvlwdh4y7rfi8hq3m0"))))117 (build-system gnu-build-system)118 (arguments119 (list120 #:tests? #f121 #:make-flags122 #~(list "CFLAGS=-O2"123 "PREFIX=/"124 (string-append "DESTDIR=" #$output)125 (string-append "CC=" #$(cc-for-target)))126 #:phases127 #~(modify-phases %standard-phases128 (delete 'configure))))129 (inputs (list pkg-config))130 (native-inputs (list libgit2))131 (home-page "https://git.8pit.net/git-shuffle")132 (synopsis "Randomize timestamps associated with Git commits to enhance privacy")133 (description "")134 (license license:gpl3))))135136;; TODO: Use package-with-extra-patches somehow, however, we need to change137;; the package name somehow as loksh would otherwise be ambiguous and not138;; sure how do that on a package returned by package-with-extra-patches.139(define-public loksh-8pit140 (package141 (inherit loksh)142 (name "loksh-8pit")143 (source144 (origin145 (inherit (package-source loksh))146 (patches (nmeum-patches147 "loksh-bracketed-paste-mode.patch"148 "loksh-kshbasename.patch"))))))149150(define-public tpm151 (package152 (name "tpm")153 (version "1.3.3")154 (source155 (origin156 (method git-fetch)157 (uri (git-reference158 (url "https://git.8pit.net/tpm.git")159 (commit version)))160 (file-name (git-file-name name version))161 (sha256162 (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))163 (build-system gnu-build-system)164 (arguments165 (list166 #:tests? #f167 #:make-flags168 #~(list "PREFIX=/"169 (string-append "DESTDIR=" #$output))170 #:phases171 #~(modify-phases %standard-phases172 (add-after 'unpack 'fix-paths173 (lambda* (#:key inputs outputs #:allow-other-keys)174 (substitute* "tpm"175 (("gpg2")176 (search-input-file inputs "/bin/gpg")))))177 (delete 'configure))))178 (inputs (list gnupg))179 (native-inputs (list perl))180 (home-page "https://git.8pit.net/tpm")181 (synopsis "Tiny password manager")182 (description183 "Tiny shell script which is heavily inspired and largely184compatible with @code{pass}. Just like pass it uses @code{gnupg} to securely185store your passwords, the major difference between pass and tpm is that the186latter is a lot more minimal.")187 (license license:gpl3)))188189(define-public archive-mail190 (package191 (name "archive-mail")192 (version "v0.0.0-20260103100740-0b0c03251191")193 (source194 (origin195 (method git-fetch)196 (uri (git-reference197 (url "https://git.8pit.net/archive-mail.git")198 (commit (go-version->git-ref version))))199 (file-name (git-file-name name version))200 (sha256201 (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))202 (build-system go-build-system)203 (arguments204 (list205 #:install-source? #f206 #:import-path "github.com/nmeum/archive-mail"207 #:phases208 #~(modify-phases %standard-phases209 (replace 'check210 (lambda* (#:key tests? import-path #:allow-other-keys)211 (when tests?212 (with-directory-excursion (string-append "src/" import-path "/tests")213 (setenv "ARCHIVE_MAIL" (in-vicinity (getenv "GOBIN") "archive-mail"))214 (invoke "./run_tests.sh"))))))))215 (inputs (list bash-minimal diffutils))216 (home-page "https://git.8pit.net/archive-logs")217 (synopsis "archive-mail")218 (description "")219 (license license:gpl3+)))220221(define-public archive-logs222 (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")223 (revision "0"))224 (package225 (name "archive-logs")226 (version (git-version "20211124" revision commit))227 (source228 (origin229 (method git-fetch)230 (uri (git-reference231 (url "https://git.8pit.net/archive-logs.git")232 (commit commit)))233 (file-name (git-file-name name version))234 (sha256235 (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))236 (build-system gnu-build-system)237 (arguments238 (list239 #:test-target "check"240 #:make-flags241 #~(list "CFLAGS=-O2"242 "HAVE_SENDFILE=1"243 "PREFIX=/"244 (string-append "DESTDIR=" #$output)245 (string-append "CC=" #$(cc-for-target)))246 #:phases247 #~(modify-phases %standard-phases248 (delete 'configure))))249 (inputs (list bash-minimal))250 (home-page "https://git.8pit.net/archive-logs")251 (synopsis "Iteratively archive newline separated log files")252 (description "")253 (license license:gpl3))))254255(define-public simple-cc-8pit256 (package257 (inherit simple-cc)258 (name "simple-cc-8pit")259 (source260 (origin261 (inherit (package-source simple-cc))262 (patches (append (origin-patches (package-source simple-cc))263 (nmeum-patches "simple-cc-qbe-func-return-type.patch")))))))