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 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 version-control)
 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(define-public tpm
126  (package
127    (name "tpm")
128    (version "1.3.3")
129    (source
130     (origin
131       (method git-fetch)
132       (uri (git-reference
133             (url "https://git.8pit.net/tpm.git")
134             (commit version)))
135       (file-name (git-file-name name version))
136       (sha256
137        (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))
138    (build-system gnu-build-system)
139    (arguments
140     (list
141      #:tests? #f
142      #:make-flags
143      #~(list "PREFIX=/"
144              (string-append "DESTDIR=" #$output))
145      #:phases
146      #~(modify-phases %standard-phases
147          (add-after 'unpack 'fix-paths
148            (lambda* (#:key inputs outputs #:allow-other-keys)
149              (substitute* "tpm"
150                (("gpg2")
151                 (search-input-file inputs "/bin/gpg")))))
152          (delete 'configure))))
153    (inputs (list gnupg))
154    (native-inputs (list perl))
155    (home-page "https://git.8pit.net/tpm")
156    (synopsis "Tiny password manager")
157    (description
158     "Tiny shell script which is heavily inspired and largely
159compatible with @code{pass}.  Just like pass it uses @code{gnupg} to securely
160store your passwords, the major difference between pass and tpm is that the
161latter is a lot more minimal.")
162    (license license:gpl3)))
163
164(define-public pimsync
165  (package
166    (name "pimsync")
167    (version "0.5.2")
168    (source
169      (origin
170        (method git-fetch)
171        (uri (git-reference
172               (url "https://git.sr.ht/~whynothugo/pimsync")
173               (commit (string-append "v" version))))
174        (file-name (git-file-name name version))
175        (sha256
176          (base32 "0r8ph1gra5d9wb06c8khcz0rpjak2dcpvkvdm7aj55gdvcnx4v9d"))))
177    (build-system cargo-build-system)
178    (arguments
179      (list #:install-source? #f
180            #:phases
181            #~(modify-phases %standard-phases
182                ;; XXX: Forcefully disable experimental jmap support as it
183                ;; introduces a dependency on jmap-tools which does not compile
184                ;; with rustc-1.85.1 due to utilization of unstable rustc
185                ;; features.  Can be removed once we upgrade to rustc-1.86.X.
186                (add-after 'unpack 'disable-jmap
187                  (lambda _
188                    (substitute* "Cargo.toml"
189                      ((".*jmap.*") ""))))
190                (add-after 'unpack 'setup-environment
191                  (lambda _
192                    (setenv "PIMSYNC_VERSION" #$version)))
193                (add-after 'install 'install-man-pages
194                  (lambda _
195                    (let ((man (string-append #$output "/share/man/man")))
196                      (install-file "pimsync.1" (string-append man "1"))
197                      (install-file "pimsync.conf.5" (string-append man "5"))
198                      (install-file "pimsync-migration.7" (string-append man "7"))))))))
199    (inputs (cons* sqlite (cargo-inputs 'pimsync #:module '(nmeum packages rust-crates))))
200    (synopsis "Synchronize calendars and contacts using CalDAV, CardDAV and others")
201    (description "pimsync synchronizes your calendars and contacts between two
202storage locations.  The most popular purpose is to synchronize a CalDAV or
203CardDAV server with a local folder or file.")
204    (home-page "https://pimsync.whynothugo.nl/")
205    (license license:eupl1.2)))
206
207(define-public go-webdav
208  (package/inherit go-github-com-emersion-go-webdav
209    (name "go-webdav")
210    (arguments
211      (substitute-keyword-arguments
212        (package-arguments go-github-com-emersion-go-webdav)
213        ((#:tests? _ #t) #f)
214        ((#:install-source? _ #t) #f)
215        ((#:import-path _ "github.com/emersion/go-webdav") "github.com/emersion/go-webdav/cmd/webdav-server")
216        ((#:unpack-path _ "") "github.com/emersion/go-webdav")))
217    (native-inputs (package-propagated-inputs go-github-com-emersion-go-webdav))
218    (propagated-inputs '())
219    (inputs '())))
220
221(define-public archive-mail
222  (package
223    (name "archive-mail")
224    (version "v0.0.0-20260103100740-0b0c03251191")
225    (source
226     (origin
227       (method git-fetch)
228       (uri (git-reference
229             (url "https://git.8pit.net/archive-mail.git")
230             (commit (go-version->git-ref version))))
231       (file-name (git-file-name name version))
232       (sha256
233        (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))
234    (build-system go-build-system)
235    (arguments
236     (list
237      #:install-source? #f
238      #:import-path "github.com/nmeum/archive-mail"
239      #:phases
240      #~(modify-phases %standard-phases
241          (replace 'check
242            (lambda* (#:key tests? import-path #:allow-other-keys)
243              (when tests?
244                (with-directory-excursion (string-append "src/" import-path "/tests")
245                   (setenv "ARCHIVE_MAIL" (in-vicinity (getenv "GOBIN") "archive-mail"))
246                   (invoke "./run_tests.sh"))))))))
247    (inputs (list bash-minimal diffutils))
248    (home-page "https://git.8pit.net/archive-logs")
249    (synopsis "archive-mail")
250    (description "")
251    (license license:gpl3+)))
252
253(define-public archive-logs
254  (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")
255        (revision "0"))
256    (package
257      (name "archive-logs")
258      (version (git-version "20211124" revision commit))
259      (source
260       (origin
261         (method git-fetch)
262         (uri (git-reference
263               (url "https://git.8pit.net/archive-logs.git")
264               (commit commit)))
265         (file-name (git-file-name name version))
266         (sha256
267          (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))
268      (build-system gnu-build-system)
269      (arguments
270       (list
271        #:test-target "check"
272        #:make-flags
273        #~(list "CFLAGS=-O2"
274                "HAVE_SENDFILE=1"
275                "PREFIX=/"
276                (string-append "DESTDIR=" #$output)
277                (string-append "CC=" #$(cc-for-target)))
278        #:phases
279        #~(modify-phases %standard-phases
280            (delete 'configure))))
281      (inputs (list bash-minimal))
282      (home-page "https://git.8pit.net/archive-logs")
283      (synopsis "Iteratively archive newline separated log files")
284      (description "")
285      (license license:gpl3))))