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 git-shuffle
 77  (let ((commit "06ac27513a275c979aa57cd8c932b90c8cb689eb")
 78        (revision "1"))
 79    (package
 80      (name "git-shuffle")
 81      (version (git-version "20251025" revision commit))
 82      (source
 83       (origin
 84         (method git-fetch)
 85         (uri (git-reference
 86               (url "https://git.8pit.net/git-shuffle.git")
 87               (commit commit)))
 88         (file-name (git-file-name name version))
 89         (sha256
 90          (base32 "1say9ap60l04i3lj4gbf0dn6zbf457cf5fdvlwdh4y7rfi8hq3m0"))))
 91      (build-system gnu-build-system)
 92      (arguments
 93       (list
 94        #:tests? #f
 95        #:make-flags
 96        #~(list "CFLAGS=-O2"
 97                "PREFIX=/"
 98                (string-append "DESTDIR=" #$output)
 99                (string-append "CC=" #$(cc-for-target)))
100        #:phases
101        #~(modify-phases %standard-phases
102            (delete 'configure))))
103      (inputs (list pkg-config))
104      (native-inputs (list libgit2))
105      (home-page "https://git.8pit.net/git-shuffle")
106      (synopsis "Randomize timestamps associated with Git commits to enhance privacy")
107      (description "")
108      (license license:gpl3))))
109
110;; TODO: Use package-with-extra-patches somehow, however, we need to change
111;; the package name somehow as loksh would otherwise be ambiguous and not
112;; sure how do that on a package returned by package-with-extra-patches.
113(define-public loksh-8pit
114  (package
115    (inherit loksh)
116    (name "loksh-8pit")
117    (source
118     (origin
119       (inherit (package-source loksh))
120       (patches (nmeum-patches
121                  "loksh-bracketed-paste-mode.patch"
122                  "loksh-kshbasename.patch"))))))
123
124(define-public tpm
125  (package
126    (name "tpm")
127    (version "1.3.3")
128    (source
129     (origin
130       (method git-fetch)
131       (uri (git-reference
132             (url "https://git.8pit.net/tpm.git")
133             (commit version)))
134       (file-name (git-file-name name version))
135       (sha256
136        (base32 "109q5ag4cbrxbr2slnb3ii9zkjnim5yxfb3j34yf3r32yd6kmjlg"))))
137    (build-system gnu-build-system)
138    (arguments
139     (list
140      #:tests? #f
141      #:make-flags
142      #~(list "PREFIX=/"
143              (string-append "DESTDIR=" #$output))
144      #:phases
145      #~(modify-phases %standard-phases
146          (add-after 'unpack 'fix-paths
147            (lambda* (#:key inputs outputs #:allow-other-keys)
148              (substitute* "tpm"
149                (("gpg2")
150                 (search-input-file inputs "/bin/gpg")))))
151          (delete 'configure))))
152    (inputs (list gnupg))
153    (native-inputs (list perl))
154    (home-page "https://git.8pit.net/tpm")
155    (synopsis "Tiny password manager")
156    (description
157     "Tiny shell script which is heavily inspired and largely
158compatible with @code{pass}.  Just like pass it uses @code{gnupg} to securely
159store your passwords, the major difference between pass and tpm is that the
160latter is a lot more minimal.")
161    (license license:gpl3)))
162
163(define-public archive-mail
164  (package
165    (name "archive-mail")
166    (version "v0.0.0-20260103100740-0b0c03251191")
167    (source
168     (origin
169       (method git-fetch)
170       (uri (git-reference
171             (url "https://git.8pit.net/archive-mail.git")
172             (commit (go-version->git-ref version))))
173       (file-name (git-file-name name version))
174       (sha256
175        (base32 "1fdwf2xyy8gkvagq6ivsd0kvfxx9xl3fvd81v54agwmlszxa8jc6"))))
176    (build-system go-build-system)
177    (arguments
178     (list
179      #:install-source? #f
180      #:import-path "github.com/nmeum/archive-mail"
181      #:phases
182      #~(modify-phases %standard-phases
183          (replace 'check
184            (lambda* (#:key tests? import-path #:allow-other-keys)
185              (when tests?
186                (with-directory-excursion (string-append "src/" import-path "/tests")
187                   (setenv "ARCHIVE_MAIL" (in-vicinity (getenv "GOBIN") "archive-mail"))
188                   (invoke "./run_tests.sh"))))))))
189    (inputs (list bash-minimal diffutils))
190    (home-page "https://git.8pit.net/archive-logs")
191    (synopsis "archive-mail")
192    (description "")
193    (license license:gpl3+)))
194
195(define-public archive-logs
196  (let ((commit "faaf2e85ee419c7b0a3c4dd0f5932834d2fb9d60")
197        (revision "0"))
198    (package
199      (name "archive-logs")
200      (version (git-version "20211124" revision commit))
201      (source
202       (origin
203         (method git-fetch)
204         (uri (git-reference
205               (url "https://git.8pit.net/archive-logs.git")
206               (commit commit)))
207         (file-name (git-file-name name version))
208         (sha256
209          (base32 "0d9fxbrajzjnb6cvaw8x363583gvdplw0yfbk7qgzzrsyfdqa52d"))))
210      (build-system gnu-build-system)
211      (arguments
212       (list
213        #:test-target "check"
214        #:make-flags
215        #~(list "CFLAGS=-O2"
216                "HAVE_SENDFILE=1"
217                "PREFIX=/"
218                (string-append "DESTDIR=" #$output)
219                (string-append "CC=" #$(cc-for-target)))
220        #:phases
221        #~(modify-phases %standard-phases
222            (delete 'configure))))
223      (inputs (list bash-minimal))
224      (home-page "https://git.8pit.net/archive-logs")
225      (synopsis "Iteratively archive newline separated log files")
226      (description "")
227      (license license:gpl3))))