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 (srfi srfi-26))
 20
 21;; TODO: This cannot be properly used with Guix right now because
 22;; gnu/system/keyboard.scm unconditionally generates the keyboard
 23;; console-keymap from xkeyboard-config.
 24(define-public neo-layout
 25  (let ((commit "97cfdd486dcd278833b80dc396e00a1c3503e6d6")
 26        (revision "1"))
 27    (package
 28      (name "neo-layout")
 29      (version (git-version "20220410" revision commit))
 30      (source
 31        (origin
 32          (method git-fetch)
 33          (uri (git-reference
 34                 (url "https://git.neo-layout.org/neo/neo-layout.git")
 35                 (commit commit)))
 36          (file-name (git-file-name name version))
 37          (sha256
 38            (base32 "0xg3n808rphn9jlpvgc4y1pz8kdjv916xshg64lkp4hakip1p45j"))))
 39      (build-system copy-build-system)
 40      (arguments
 41        `(#:install-plan
 42          '(("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 the
 46neo-layout for kbd's @code{loadkeys(1)}.  Contrary to the version generated
 47from xkeyboard-config, layer 4 actually works.")
 48      (license license:gpl3))))
 49
 50(define-public mblaze-ui
 51  (package
 52    (name "mblaze-ui")
 53    (version "0.0.0-20250423085554-54f778f3d6a8")
 54    (source
 55     (origin
 56       (method git-fetch)
 57       (uri (git-reference
 58             (url "https://git.8pit.net/mblaze-ui.git")
 59             (commit (go-version->git-ref version))))
 60       (file-name (git-file-name name version))
 61       (sha256
 62        (base32 "104fjj7da2cp2f6g8h4y6ycs68ml8smiq11clx3dc07y191mnzf1"))))
 63    (build-system go-build-system)
 64    (arguments
 65     (list
 66      #:install-source? #f
 67      #:import-path "github.com/nmeum/mblaze-ui"))
 68    (native-inputs (list mblaze
 69                         go-github-com-mattn-go-runewidth
 70                         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+)))
 75
 76(define-public webdav-server
 77  (package
 78    (name "webdav-server")
 79    (version "v0.0.0-20260424104841-60ba47890791")
 80    (source
 81     (origin
 82       (method git-fetch)
 83       (uri (git-reference
 84             (url "https://git.8pit.net/webdav-server.git")
 85             (commit (go-version->git-ref version))))
 86       (file-name (git-file-name name version))
 87       (sha256
 88        (base32 "1jp5k9y20lz9n0vwhaw5ivpqdqkam81lxdqb2gc9xx0k2jih6wpk"))))
 89    (build-system go-build-system)
 90    (arguments
 91     (list
 92      #:tests? #f
 93      #:install-source? #f
 94      #:import-path "git.8pit.net/webdav-server"))
 95    (native-inputs (list go-github-com-emersion-go-webdav))
 96    (home-page "https://git.8pit.net/webdav-server")
 97    (synopsis "Extremely simplistic WebDAV server built around go-webdav")
 98    (description "")
 99    (license license:expat)))
100
101(define-public git-shuffle
102  (let ((commit "06ac27513a275c979aa57cd8c932b90c8cb689eb")
103        (revision "1"))
104    (package
105      (name "git-shuffle")
106      (version (git-version "20251025" revision commit))
107      (source
108       (origin
109         (method git-fetch)
110         (uri (git-reference
111               (url "https://git.8pit.net/git-shuffle.git")
112               (commit commit)))
113         (file-name (git-file-name name version))
114         (sha256
115          (base32 "1say9ap60l04i3lj4gbf0dn6zbf457cf5fdvlwdh4y7rfi8hq3m0"))))
116      (build-system gnu-build-system)
117      (arguments
118       (list
119        #:tests? #f
120        #:make-flags
121        #~(list "CFLAGS=-O2"
122                "PREFIX=/"
123                (string-append "DESTDIR=" #$output)
124                (string-append "CC=" #$(cc-for-target)))
125        #:phases
126        #~(modify-phases %standard-phases
127            (delete 'configure))))
128      (inputs (list pkg-config))
129      (native-inputs (list libgit2))
130      (home-page "https://git.8pit.net/git-shuffle")
131      (synopsis "Randomize timestamps associated with Git commits to enhance privacy")
132      (description "")
133      (license license:gpl3))))
134
135;; TODO: Use package-with-extra-patches somehow, however, we need to change
136;; the package name somehow as loksh would otherwise be ambiguous and not
137;; sure how do that on a package returned by package-with-extra-patches.
138(define-public loksh-8pit
139  (package
140    (inherit loksh)
141    (name "loksh-8pit")
142    (source
143     (origin
144       (inherit (package-source loksh))
145       (patches (nmeum-patches
146                  "loksh-bracketed-paste-mode.patch"
147                  "loksh-kshbasename.patch"))))))
148
149(define-public tpm
150  (package
151    (name "tpm")
152    (version "1.3.3")
153    (source
154     (origin
155       (method git-fetch)
156       (uri (git-reference
157             (url "https://git.8pit.net/tpm.git")
158             (commit version)))
159       (file-name (git-file-name name version))
160       (sha256
161        (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))
162    (build-system gnu-build-system)
163    (arguments
164     (list
165      #:tests? #f
166      #:make-flags
167      #~(list "PREFIX=/"
168              (string-append "DESTDIR=" #$output))
169      #:phases
170      #~(modify-phases %standard-phases
171          (add-after 'unpack 'fix-paths
172            (lambda* (#:key inputs outputs #:allow-other-keys)
173              (substitute* "tpm"
174                (("gpg2")
175                 (search-input-file inputs "/bin/gpg")))))
176          (delete 'configure))))
177    (inputs (list gnupg))
178    (native-inputs (list perl))
179    (home-page "https://git.8pit.net/tpm")
180    (synopsis "Tiny password manager")
181    (description
182     "Tiny shell script which is heavily inspired and largely
183compatible with @code{pass}.  Just like pass it uses @code{gnupg} to securely
184store your passwords, the major difference between pass and tpm is that the
185latter is a lot more minimal.")
186    (license license:gpl3)))
187
188(define-public archive-mail
189  (package
190    (name "archive-mail")
191    (version "v0.0.0-20260103100740-0b0c03251191")
192    (source
193     (origin
194       (method git-fetch)
195       (uri (git-reference
196             (url "https://git.8pit.net/archive-mail.git")
197             (commit (go-version->git-ref version))))
198       (file-name (git-file-name name version))
199       (sha256
200        (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))
201    (build-system go-build-system)
202    (arguments
203     (list
204      #:install-source? #f
205      #:import-path "github.com/nmeum/archive-mail"
206      #:phases
207      #~(modify-phases %standard-phases
208          (replace 'check
209            (lambda* (#:key tests? import-path #:allow-other-keys)
210              (when tests?
211                (with-directory-excursion (string-append "src/" import-path "/tests")
212                   (setenv "ARCHIVE_MAIL" (in-vicinity (getenv "GOBIN") "archive-mail"))
213                   (invoke "./run_tests.sh"))))))))
214    (inputs (list bash-minimal diffutils))
215    (home-page "https://git.8pit.net/archive-logs")
216    (synopsis "archive-mail")
217    (description "")
218    (license license:gpl3+)))
219
220(define-public archive-logs
221  (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")
222        (revision "0"))
223    (package
224      (name "archive-logs")
225      (version (git-version "20211124" revision commit))
226      (source
227       (origin
228         (method git-fetch)
229         (uri (git-reference
230               (url "https://git.8pit.net/archive-logs.git")
231               (commit commit)))
232         (file-name (git-file-name name version))
233         (sha256
234          (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))
235      (build-system gnu-build-system)
236      (arguments
237       (list
238        #:test-target "check"
239        #:make-flags
240        #~(list "CFLAGS=-O2"
241                "HAVE_SENDFILE=1"
242                "PREFIX=/"
243                (string-append "DESTDIR=" #$output)
244                (string-append "CC=" #$(cc-for-target)))
245        #:phases
246        #~(modify-phases %standard-phases
247            (delete 'configure))))
248      (inputs (list bash-minimal))
249      (home-page "https://git.8pit.net/archive-logs")
250      (synopsis "Iteratively archive newline separated log files")
251      (description "")
252      (license license:gpl3))))