guix-channel

A channel for the Guix package manager

git clone https://git.8pit.net/guix-channel.git

  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))
 21
 22;; TODO: This cannot be properly used with Guix right now because
 23;; gnu/system/keyboard.scm unconditionally generates the keyboard
 24;; console-keymap from xkeyboard-config.
 25(define-public neo-layout
 26  (let ((commit "97cfdd486dcd278833b80dc396e00a1c3503e6d6")
 27        (revision "1"))
 28    (package
 29      (name "neo-layout")
 30      (version (git-version "20220410" revision commit))
 31      (source
 32        (origin
 33          (method git-fetch)
 34          (uri (git-reference
 35                 (url "https://git.neo-layout.org/neo/neo-layout.git")
 36                 (commit commit)))
 37          (file-name (git-file-name name version))
 38          (sha256
 39            (base32 "0xg3n808rphn9jlpvgc4y1pz8kdjv916xshg64lkp4hakip1p45j"))))
 40      (build-system copy-build-system)
 41      (arguments
 42        `(#:install-plan
 43          '(("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 the
 47neo-layout for kbd's @code{loadkeys(1)}.  Contrary to the version generated
 48from xkeyboard-config, layer 4 actually works.")
 49      (license license:gpl3))))
 50
 51(define-public mblaze-ui
 52  (package
 53    (name "mblaze-ui")
 54    (version "0.0.0-20250423085554-54f778f3d6a8")
 55    (source
 56     (origin
 57       (method git-fetch)
 58       (uri (git-reference
 59             (url "https://git.8pit.net/mblaze-ui.git")
 60             (commit (go-version->git-ref version))))
 61       (file-name (git-file-name name version))
 62       (sha256
 63        (base32 "104fjj7da2cp2f6g8h4y6ycs68ml8smiq11clx3dc07y191mnzf1"))))
 64    (build-system go-build-system)
 65    (arguments
 66     (list
 67      #:install-source? #f
 68      #:import-path "github.com/nmeum/mblaze-ui"))
 69    (native-inputs (list mblaze
 70                         go-github-com-mattn-go-runewidth
 71                         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+)))
 76
 77(define-public git-shuffle
 78  (let ((commit "06ac27513a275c979aa57cd8c932b90c8cb689eb")
 79        (revision "1"))
 80    (package
 81      (name "git-shuffle")
 82      (version (git-version "20251025" revision commit))
 83      (source
 84       (origin
 85         (method git-fetch)
 86         (uri (git-reference
 87               (url "https://git.8pit.net/git-shuffle.git")
 88               (commit commit)))
 89         (file-name (git-file-name name version))
 90         (sha256
 91          (base32 "1say9ap60l04i3lj4gbf0dn6zbf457cf5fdvlwdh4y7rfi8hq3m0"))))
 92      (build-system gnu-build-system)
 93      (arguments
 94       (list
 95        #:tests? #f
 96        #:make-flags
 97        #~(list "CFLAGS=-O2"
 98                "PREFIX=/"
 99                (string-append "DESTDIR=" #$output)
100                (string-append "CC=" #$(cc-for-target)))
101        #:phases
102        #~(modify-phases %standard-phases
103            (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))))
110
111;; TODO: Use package-with-extra-patches somehow, however, we need to change
112;; the package name somehow as loksh would otherwise be ambiguous and not
113;; sure how do that on a package returned by package-with-extra-patches.
114(define-public loksh-8pit
115  (package
116    (inherit loksh)
117    (name "loksh-8pit")
118    (source
119     (origin
120       (inherit (package-source loksh))
121       (patches (nmeum-patches
122                  "loksh-bracketed-paste-mode.patch"
123                  "loksh-kshbasename.patch"))))))
124
125;; XXX: https://codeberg.org/guix/guix/pulls/6295
126(define-public neovim-8pit
127  (package
128    (inherit neovim)
129    (name "neovim-8pit")
130    (source
131     (origin
132       (inherit (package-source neovim))
133       (patches (nmeum-patches "neovim-tree-sitter-grammar-path.patch"))))
134    (propagated-inputs
135     ;; bundled tree-sitters, neovim assumes that these are available.
136     ;; See https://neovim.io/doc/user/treesitter.html#treesitter-parsers
137     (list tree-sitter-c tree-sitter-lua tree-sitter-markdown
138           ;; TODO: tree-sitter-vimscript
139           tree-sitter-vimdoc))
140    (native-search-paths
141     (list (search-path-specification
142            (variable "TREE_SITTER_GRAMMAR_PATH")
143            (files '("lib/tree-sitter")))))))
144
145(define-public tpm
146  (package
147    (name "tpm")
148    (version "1.3.3")
149    (source
150     (origin
151       (method git-fetch)
152       (uri (git-reference
153             (url "https://git.8pit.net/tpm.git")
154             (commit version)))
155       (file-name (git-file-name name version))
156       (sha256
157        (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))
158    (build-system gnu-build-system)
159    (arguments
160     (list
161      #:tests? #f
162      #:make-flags
163      #~(list "PREFIX=/"
164              (string-append "DESTDIR=" #$output))
165      #:phases
166      #~(modify-phases %standard-phases
167          (add-after 'unpack 'fix-paths
168            (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    (description
178     "Tiny shell script which is heavily inspired and largely
179compatible with @code{pass}.  Just like pass it uses @code{gnupg} to securely
180store your passwords, the major difference between pass and tpm is that the
181latter is a lot more minimal.")
182    (license license:gpl3)))
183
184(define-public archive-mail
185  (package
186    (name "archive-mail")
187    (version "v0.0.0-20260103100740-0b0c03251191")
188    (source
189     (origin
190       (method git-fetch)
191       (uri (git-reference
192             (url "https://git.8pit.net/archive-mail.git")
193             (commit (go-version->git-ref version))))
194       (file-name (git-file-name name version))
195       (sha256
196        (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))
197    (build-system go-build-system)
198    (arguments
199     (list
200      #:install-source? #f
201      #:import-path "github.com/nmeum/archive-mail"
202      #:phases
203      #~(modify-phases %standard-phases
204          (replace 'check
205            (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+)))
215
216(define-public archive-logs
217  (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")
218        (revision "0"))
219    (package
220      (name "archive-logs")
221      (version (git-version "20211124" revision commit))
222      (source
223       (origin
224         (method git-fetch)
225         (uri (git-reference
226               (url "https://git.8pit.net/archive-logs.git")
227               (commit commit)))
228         (file-name (git-file-name name version))
229         (sha256
230          (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))
231      (build-system gnu-build-system)
232      (arguments
233       (list
234        #:test-target "check"
235        #:make-flags
236        #~(list "CFLAGS=-O2"
237                "HAVE_SENDFILE=1"
238                "PREFIX=/"
239                (string-append "DESTDIR=" #$output)
240                (string-append "CC=" #$(cc-for-target)))
241        #:phases
242        #~(modify-phases %standard-phases
243            (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))))