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 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))
 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 webdav-server
 78  (package
 79    (name "webdav-server")
 80    (version "v0.0.0-20260424104841-60ba47890791")
 81    (source
 82     (origin
 83       (method git-fetch)
 84       (uri (git-reference
 85             (url "https://git.8pit.net/webdav-server.git")
 86             (commit (go-version->git-ref version))))
 87       (file-name (git-file-name name version))
 88       (sha256
 89        (base32 "1jp5k9y20lz9n0vwhaw5ivpqdqkam81lxdqb2gc9xx0k2jih6wpk"))))
 90    (build-system go-build-system)
 91    (arguments
 92     (list
 93      #:tests? #f
 94      #:install-source? #f
 95      #: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)))
101
102(define-public git-shuffle
103  (let ((commit "06ac27513a275c979aa57cd8c932b90c8cb689eb")
104        (revision "1"))
105    (package
106      (name "git-shuffle")
107      (version (git-version "20251025" revision commit))
108      (source
109       (origin
110         (method git-fetch)
111         (uri (git-reference
112               (url "https://git.8pit.net/git-shuffle.git")
113               (commit commit)))
114         (file-name (git-file-name name version))
115         (sha256
116          (base32 "1say9ap60l04i3lj4gbf0dn6zbf457cf5fdvlwdh4y7rfi8hq3m0"))))
117      (build-system gnu-build-system)
118      (arguments
119       (list
120        #:tests? #f
121        #:make-flags
122        #~(list "CFLAGS=-O2"
123                "PREFIX=/"
124                (string-append "DESTDIR=" #$output)
125                (string-append "CC=" #$(cc-for-target)))
126        #:phases
127        #~(modify-phases %standard-phases
128            (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))))
135
136;; TODO: Use package-with-extra-patches somehow, however, we need to change
137;; the package name somehow as loksh would otherwise be ambiguous and not
138;; sure how do that on a package returned by package-with-extra-patches.
139(define-public loksh-8pit
140  (package
141    (inherit loksh)
142    (name "loksh-8pit")
143    (source
144     (origin
145       (inherit (package-source loksh))
146       (patches (nmeum-patches
147                  "loksh-bracketed-paste-mode.patch"
148                  "loksh-kshbasename.patch"))))))
149
150(define-public tpm
151  (package
152    (name "tpm")
153    (version "1.3.3")
154    (source
155     (origin
156       (method git-fetch)
157       (uri (git-reference
158             (url "https://git.8pit.net/tpm.git")
159             (commit version)))
160       (file-name (git-file-name name version))
161       (sha256
162        (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))
163    (build-system gnu-build-system)
164    (arguments
165     (list
166      #:tests? #f
167      #:make-flags
168      #~(list "PREFIX=/"
169              (string-append "DESTDIR=" #$output))
170      #:phases
171      #~(modify-phases %standard-phases
172          (add-after 'unpack 'fix-paths
173            (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    (description
183     "Tiny shell script which is heavily inspired and largely
184compatible with @code{pass}.  Just like pass it uses @code{gnupg} to securely
185store your passwords, the major difference between pass and tpm is that the
186latter is a lot more minimal.")
187    (license license:gpl3)))
188
189(define-public archive-mail
190  (package
191    (name "archive-mail")
192    (version "v0.0.0-20260103100740-0b0c03251191")
193    (source
194     (origin
195       (method git-fetch)
196       (uri (git-reference
197             (url "https://git.8pit.net/archive-mail.git")
198             (commit (go-version->git-ref version))))
199       (file-name (git-file-name name version))
200       (sha256
201        (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))
202    (build-system go-build-system)
203    (arguments
204     (list
205      #:install-source? #f
206      #:import-path "github.com/nmeum/archive-mail"
207      #:phases
208      #~(modify-phases %standard-phases
209          (replace 'check
210            (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+)))
220
221(define-public archive-logs
222  (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")
223        (revision "0"))
224    (package
225      (name "archive-logs")
226      (version (git-version "20211124" revision commit))
227      (source
228       (origin
229         (method git-fetch)
230         (uri (git-reference
231               (url "https://git.8pit.net/archive-logs.git")
232               (commit commit)))
233         (file-name (git-file-name name version))
234         (sha256
235          (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))
236      (build-system gnu-build-system)
237      (arguments
238       (list
239        #:test-target "check"
240        #:make-flags
241        #~(list "CFLAGS=-O2"
242                "HAVE_SENDFILE=1"
243                "PREFIX=/"
244                (string-append "DESTDIR=" #$output)
245                (string-append "CC=" #$(cc-for-target)))
246        #:phases
247        #~(modify-phases %standard-phases
248            (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))))
254
255(define-public simple-cc-8pit
256  (package
257    (inherit simple-cc)
258    (name "simple-cc-8pit")
259    (source
260     (origin
261       (inherit (package-source simple-cc))
262       (patches (append (origin-patches (package-source simple-cc))
263                        (nmeum-patches "simple-cc-qbe-func-return-type.patch")))))))