projects/guix·blob kernel-updates · refs

2561 lines · 101.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Steve Sprang <[email protected]>
3;;; Copyright © 2015-2024 Efraim Flashner <[email protected]>
4;;; Copyright © 2015 Aljosha Papsch <[email protected]>
5;;; Copyright © 2016 Christine Lemmer-Webber <[email protected]>
6;;; Copyright © 2016 Jessica Tallon <[email protected]>
7;;; Copyright © 2016 Andreas Enge <[email protected]>
8;;; Copyright © 2016 Lukas Gradl <[email protected]>
9;;; Copyright © 2016, 2019, 2020 Alex Griffin <[email protected]>
10;;; Copyright © 2017 Leo Famulari <[email protected]>
11;;; Copyright © 2017, 2018 Clément Lassieur <[email protected]>
12;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <[email protected]>
13;;; Copyright © 2017 Jelle Licht <[email protected]>
14;;; Copyright © 2017, 2019 Eric Bavier <[email protected]>
15;;; Copyright © 2017, 2020-2022, 2024 Nicolas Goaziou <[email protected]>
16;;; Copyright © 2017 Manolis Fragkiskos Ragkousis <[email protected]>
17;;; Copyright © 2017 Rutger Helling <[email protected]>
18;;; Copyright © 2018, 2022 Marius Bakke <[email protected]>
19;;; Copyright © 2018 Konrad Hinsen <[email protected]>
20;;; Copyright © 2018 Thomas Sigurdsen <[email protected]>
21;;; Copyright © 2018 Arun Isaac <[email protected]>
22;;; Copyright © 2018 Pierre Neidhardt <[email protected]>
23;;; Copyright © 2018 Amirouche Boubekki <[email protected]>
24;;; Copyright © 2018, 2019, 2020 Tim Gesthuizen <[email protected]>
25;;; Copyright © 2019 Jens Mølgaard <[email protected]>
26;;; Copyright © 2019,2022 Tanguy Le Carrour <[email protected]>
27;;; Copyright © 2020, 2024 Guillaume Le Vaillant <[email protected]>
28;;; Copyright © 2020 Brice Waegeneire <[email protected]>
29;;; Copyright © 2020 Jean-Baptiste Note <[email protected]>
30;;; Copyright © 2020 Michael Rohleder <[email protected]>
31;;; Copyright © 2020 Vinicius Monego <[email protected]>
32;;; Copyright © 2020 Hartmut Goebel <[email protected]>
33;;; Copyright © 2021 Stefan Reichör <[email protected]>
34;;; Copyright © 2021 Xinglu Chen <[email protected]>
35;;; Copyright © 2020 Hartmut Goebel <[email protected]>
36;;; Copyright © 2021 David Dashyan <[email protected]>
37;;; Copyright © 2022 Maxim Cournoyer <[email protected]>
38;;; Copyright © 2022 Maxime Devos <[email protected]>
39;;; Copyright © 2022 ( <[email protected]>
40;;; Copyright © 2022 Nicolas Graves <[email protected]>
41;;; Copyright © 2022 Petr Hodina <[email protected]>
42;;; Copyright © 2023 Christian Miller <[email protected]>
43;;; Copyright © 2024, 2025 John Kehayias <[email protected]>
44;;; Copyright © 2024 Janneke Nieuwenhuizen <[email protected]>
45;;; Copyright © 2025 Cayetano Santos <[email protected]>
46;;; Copyright © 2025 Isidor Zeuner <[email protected]>
47;;; Copyright © 2026 John Dawson <[email protected]>
48;;; Copyright © 2026 Ivan Vilata i Balaguer <[email protected]>
49;;; Copyright © 2026 Giacomo Leidi <[email protected]>
50;;; Copyright © 2026 Zheng Junjie <[email protected]>
51;;; Copyright © 2026 Kjartan Oli Agustsson <[email protected]>
52;;; Copyright © 2026 Robin Templeton <[email protected]>
53;;;
54;;; This file is part of GNU Guix.
55;;;
56;;; GNU Guix is free software; you can redistribute it and/or modify it
57;;; under the terms of the GNU General Public License as published by
58;;; the Free Software Foundation; either version 3 of the License, or (at
59;;; your option) any later version.
60;;;
61;;; GNU Guix is distributed in the hope that it will be useful, but
62;;; WITHOUT ANY WARRANTY; without even the implied warranty of
63;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64;;; GNU General Public License for more details.
65;;;
66;;; You should have received a copy of the GNU General Public License
67;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
68
69(define-module (gnu packages password-utils)
70 #:use-module ((guix licenses) #:prefix license:)
71 #:use-module (guix build-system cargo)
72 #:use-module (guix build-system cmake)
73 #:use-module (guix build-system copy)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system go)
76 #:use-module (guix build-system hare)
77 #:use-module (guix build-system pyproject)
78 #:use-module (guix build-system qt)
79 #:use-module (guix build-system trivial)
80 #:use-module (guix download)
81 #:use-module (guix gexp)
82 #:use-module (guix git-download)
83 #:use-module (guix packages)
84 #:use-module (guix utils)
85 #:use-module (gnu packages)
86 #:use-module (gnu packages admin)
87 #:use-module (gnu packages aidc)
88 #:use-module (gnu packages authentication)
89 #:use-module (gnu packages autotools)
90 #:use-module (gnu packages base)
91 #:use-module (gnu packages bash)
92 #:use-module (gnu packages check)
93 #:use-module (gnu packages compression)
94 #:use-module (gnu packages crypto)
95 #:use-module (gnu packages cryptsetup)
96 #:use-module (gnu packages curl)
97 #:use-module (gnu packages databases)
98 #:use-module (gnu packages digest)
99 #:use-module (gnu packages docbook)
100 #:use-module (gnu packages dotnet)
101 #:use-module (gnu packages file)
102 #:use-module (gnu packages freedesktop)
103 #:use-module (gnu packages gettext)
104 #:use-module (gnu packages glib)
105 #:use-module (gnu packages gnome)
106 #:use-module (gnu packages gnupg)
107 #:use-module (gnu packages golang)
108 #:use-module (gnu packages golang-build)
109 #:use-module (gnu packages golang-check)
110 #:use-module (gnu packages golang-crypto)
111 #:use-module (gnu packages golang-xyz)
112 #:use-module (gnu packages golang-web)
113 #:use-module (gnu packages gtk)
114 #:use-module (gnu packages guile)
115 #:use-module (gnu packages hare-xyz)
116 #:use-module (gnu packages image)
117 #:use-module (gnu packages kerberos)
118 #:use-module (gnu packages libffi)
119 #:use-module (gnu packages libusb)
120 #:use-module (gnu packages linux)
121 #:use-module (gnu packages man)
122 #:use-module (gnu packages multiprecision)
123 #:use-module (gnu packages ncurses)
124 #:use-module (gnu packages nettle)
125 #:use-module (gnu packages nss)
126 #:use-module (gnu packages opencl)
127 #:use-module (gnu packages perl)
128 #:use-module (gnu packages pkg-config)
129 #:use-module (gnu packages protobuf)
130 #:use-module (gnu packages python)
131 #:use-module (gnu packages python-build)
132 #:use-module (gnu packages python-crypto)
133 #:use-module (gnu packages python-web)
134 #:use-module (gnu packages python-xyz)
135 #:use-module (gnu packages rdesktop)
136 #:use-module (gnu packages readline)
137 #:use-module (gnu packages ruby)
138 #:use-module (gnu packages ruby-xyz)
139 #:use-module (gnu packages security-token)
140 #:use-module (gnu packages sqlite)
141 #:use-module (gnu packages suckless)
142 #:use-module (gnu packages tcl)
143 #:use-module (gnu packages tls)
144 #:use-module (gnu packages qt)
145 #:use-module (gnu packages rust)
146 #:use-module (gnu packages version-control)
147 #:use-module (gnu packages web)
148 #:use-module (gnu packages window-management)
149 #:use-module (gnu packages wxwidgets)
150 #:use-module (gnu packages xdisorg)
151 #:use-module (gnu packages xorg)
152 #:use-module (gnu packages xml))
153
154(define-public aws-vault
155 (package
156 (name "aws-vault")
157 (version "7.3.0")
158 (source
159 (origin
160 (method git-fetch)
161 (uri (git-reference
162 ;; This is a maintained fork of
163 ;; <https://github.com/99designs/aws-vault> which seems to be an
164 ;; abandoned project.
165 ;; See: <https://github.com/99designs/aws-vault/issues/1269>
166 ;; <https://github.com/99designs/aws-vault/issues/1253>
167 (url "https://github.com/ByteNess/aws-vault")
168 (commit (string-append "v" version))))
169 (file-name (git-file-name name version))
170 (sha256
171 (base32 "09wa18xzvmz98dy873n2lssfpipqmdrnngyq606zyvb109ji87hs"))))
172 (build-system go-build-system)
173 (arguments
174 (list
175 #:install-source? #f
176 #:import-path "github.com/byteness/aws-vault"
177 #:build-flags
178 #~(list (string-append "-ldflags=-X main.Version=" #$version))
179 #:phases
180 #~(modify-phases %standard-phases
181 (add-after 'build 'contrib
182 (lambda* (#:key import-path #:allow-other-keys)
183 (let* ((zsh-site-dir
184 (string-append #$output "/share/zsh/site-functions"))
185 (bash-completion-dir
186 (string-append #$output "/share/bash-completion/completions"))
187 (fish-completion-dir
188 (string-append #$output "/share/fish/completions")))
189 (for-each mkdir-p (list bash-completion-dir
190 fish-completion-dir
191 zsh-site-dir))
192 (with-directory-excursion
193 (string-append "src/" import-path "/contrib/completions")
194 (copy-file "zsh/aws-vault.zsh"
195 (string-append zsh-site-dir "/_aws-vault"))
196 (copy-file "bash/aws-vault.bash"
197 (string-append bash-completion-dir "/aws-vault"))
198 (copy-file "fish/aws-vault.fish"
199 (string-append fish-completion-dir "/aws-vault.fish"))))))
200 ;; aws-vault: error: add: mkdir /homeless-shelter: permission
201 ;; denied.
202 (add-before 'check 'set-home
203 (lambda _
204 (setenv "HOME" "/tmp"))))))
205 (native-inputs
206 (list go-github-com-99designs-keyring
207 go-github-com-alecthomas-kingpin-v2
208 go-github-com-aws-aws-sdk-go-v2
209 go-github-com-aws-aws-sdk-go-v2-config
210 go-github-com-aws-aws-sdk-go-v2-credentials
211 go-github-com-aws-aws-sdk-go-v2-service-iam
212 go-github-com-aws-aws-sdk-go-v2-service-sso
213 go-github-com-aws-aws-sdk-go-v2-service-ssooidc
214 go-github-com-aws-aws-sdk-go-v2-service-sts
215 go-github-com-google-go-cmp
216 go-github-com-mattn-go-isatty
217 go-github-com-mattn-go-tty
218 go-github-com-skratchdot-open-golang
219 go-golang-org-x-term
220 go-gopkg-in-ini-v1))
221 (home-page "https://github.com/99designs/aws-vault")
222 (synopsis "Vault for securely storing and accessing AWS credentials")
223 (description
224 "AWS Vault is a tool to securely store and access @acronym{Amazon Web
225Services,AWS} credentials.
226
227AWS Vault stores IAM credentials in your operating system's secure keystore and
228then generates temporary credentials from those to expose to your shell and
229applications. It's designed to be complementary to the AWS CLI tools, and is
230aware of your profiles and configuration in ~/.aws/config.")
231 (license license:expat)))
232
233(define-public lesspass
234 (package
235 (name "lesspass")
236 (version "10.2.1")
237 (source (origin
238 (method git-fetch)
239 (uri (git-reference
240 (url "https://github.com/lesspass/lesspass")
241 (commit (string-append "cli-v" version))))
242 (file-name (git-file-name name version))
243 (sha256
244 (base32
245 "1isv760pqc0c3g8mljzp4zy64anvg1ify9h6nz7pzkx0610wr75a"))))
246 (build-system pyproject-build-system)
247 (arguments (list #:test-backend #~'unittest
248 #:phases #~(modify-phases %standard-phases
249 (add-after 'unpack 'chdir
250 (lambda _
251 (chdir "cli"))))))
252 (native-inputs (list python-mock
253 python-pexpect
254 python-setuptools))
255 (inputs (list python-requests))
256 (home-page "https://lesspass.com/")
257 (synopsis "Stateless password manager")
258 (description
259 "This is the command-line interface of LessPass, which computes a
260password deterministically from a site, a login, options and a master
261password, which is the only secret to keep.")
262 (license license:gpl3)))
263
264(define-public pwgen
265 (package
266 (name "pwgen")
267 (version "2.08")
268 (source
269 (origin
270 (method url-fetch)
271 (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
272 "/pwgen-" version ".tar.gz"))
273 (sha256
274 (base32 "0yy90pqrr2pszzhb5hxjishq9qc7dqd290amiibqx9fm1b9kvc6s"))))
275 (build-system gnu-build-system)
276 (arguments
277 `(#:tests? #f)) ; no test suite
278 (home-page "http://pwgen.sourceforge.net/")
279 (synopsis "Password generator")
280 (description "Pwgen generates passwords which can be easily memorized by a
281human.")
282 (license license:gpl2)))
283
284(define-public keepassxc
285 (package
286 (name "keepassxc")
287 (version "2.7.12")
288 (source
289 (origin
290 (method git-fetch)
291 (uri (git-reference
292 (url "https://github.com/keepassxreboot/keepassxc")
293 (commit version)))
294 (file-name (git-file-name name version))
295 (sha256
296 (base32 "1mh5h1dxfpqc196ai3kzi10f33pl6028rig6j7b81z5q4936niiw"))))
297 (build-system qt-build-system)
298 (arguments
299 (list
300 #:configure-flags
301 #~(append
302 (list "-DKEEPASSXC_BUILD_TYPE=Release"
303 "-DWITH_XC_ALL=YES"
304 "-DWITH_XC_UPDATECHECK=NO")
305 #$(if (member (%current-system)
306 (package-transitive-supported-systems
307 ruby-asciidoctor/minimal))
308 #~'()
309 #~(list "-DWITH_XC_DOCS=NO")))
310 ;; Entries have recently become sorted per the locale, and
311 ;; causes testentrymodel to fail when using the C locale (see:
312 ;; https://github.com/keepassxreboot/keepassxc/issues/11813).
313 ;; testClip runs 'xclip', which hangs in the container,
314 ;; perhaps because it lacks a TTY.
315 #:test-exclude "testentrymodel|testcli"
316 #:phases
317 #~(modify-phases %standard-phases
318 (add-after 'unpack 'record-clipboard-programs
319 (lambda* (#:key inputs #:allow-other-keys)
320 ;; Record the file names of clipboard programs invoked by
321 ;; 'keepassxc-cli clip' and similar.
322 ;;
323 ;; Note: Use 'QString::fromUtf8' rather than 'QStringLiteral' so
324 ;; that the store reference is stored as ASCII instead of
325 ;; UTF-16, which would be invisible to the GC's scanner.
326 (substitute* "src/cli/Utils.cpp"
327 (("QStringLiteral\\(\"xclip\"\\)")
328 (string-append
329 "QString::fromUtf8(\""
330 (search-input-file inputs "bin/xclip")
331 "\")"))
332 (("QStringLiteral\\(\"wl-copy\"\\)")
333 (string-append
334 "QString::fromUtf8(\""
335 (search-input-file inputs "bin/wl-copy")
336 "\")")))
337 (substitute* "src/gui/Clipboard.cpp"
338 (("\"wl-copy\"")
339 (format #f "~s" (search-input-file inputs "bin/wl-copy")))))))))
340 (native-inputs
341 (append
342 (list qttools-5)
343 (if (member (%current-system)
344 (package-transitive-supported-systems
345 ruby-asciidoctor/minimal))
346 (list ruby-asciidoctor/minimal)
347 '())))
348 (inputs
349 (list argon2
350 botan
351 libgcrypt
352 libsodium ; XC_BROWSER
353 libusb
354 libyubikey ; XC_YUBIKEY
355 libxi
356 libxtst
357 minizip
358 pcsc-lite
359 qrencode
360 qtsvg-5
361 qtwayland-5
362 qtx11extras
363 readline
364 wl-clipboard ;for 'wl-copy'
365 xclip ;for 'xclip'
366 yubikey-personalization ; XC_YUBIKEY
367 zlib))
368 (home-page "https://keepassxc.org")
369 (synopsis "Password manager")
370 (description "KeePassXC is a password manager or safe which helps you to
371manage your passwords in a secure way. You can put all your passwords in one
372database, which is locked with one master key or a key-file which can be stored
373on an external storage device. The databases are encrypted using the
374algorithms AES or Twofish.")
375 ;; While various parts of the software are licensed under different licenses,
376 ;; the combined work falls under the GPLv3.
377 (license license:gpl3)))
378
379(define-public keepass
380 (package
381 (name "keepass")
382 (version "2.61.1")
383 (source
384 (origin
385 (method url-fetch)
386 (uri
387 (string-append "mirror://sourceforge/keepass/KeePass%202.x/" version
388 "/KeePass-" version "-Source.zip"))
389 (sha256
390 (base32 "0fn1c7kyb3rvdcf1nby311xc1fnyfvlbllcy8rw1crknf3ndj6vi"))))
391 (build-system gnu-build-system)
392 (arguments
393 (list
394 #:phases
395 #~(modify-phases %standard-phases
396 (replace 'unpack
397 (lambda* (#:key source #:allow-other-keys)
398 (mkdir "source")
399 (chdir "source")
400 (invoke "unzip" source)))
401 (replace 'configure
402 (lambda* (#:key inputs #:allow-other-keys)
403 (substitute* "KeePassLib/Native/NativeMethods.Unix.cs"
404 (("libgcrypt.so.20|libglib-2.0.so.0|libgtk-3.so.0" all)
405 (search-input-file inputs (string-append "/lib/" all))))
406 (substitute* "KeePass.sln"
407 (("GlobalSection\\(ExtensibilityGlobals\\).*?EndGlobalSection")
408 "")
409 (("GlobalSection\\(ExtensibilityGlobals\\).*?EndGlobalSection"
410 all)
411 "")
412 (("Format Version 10\\.0")
413 "Format Version 11.00"))
414 (substitute* "KeePass/KeePass.csproj"
415 ((" ToolsVersion=\\\"3\\.5\\\"")
416 " ToolsVersion=\"4.0\"")
417 (("<SignAssembly>true</SignAssembly>")
418 "<SignAssembly>false</SignAssembly>")
419 ;; XML Serializer AOT compiler doesn't work here.
420 ;; mono will just fall back to the runtime compiler.
421 (("[$][(]FrameworkSDKDir[)]bin.sgen[.]exe")
422 "echo"))
423 (copy-file
424 "Ext/Icons_15_VA/LowResIcons/KeePass_LR.ico"
425 "KeePass/KeePass.ico")
426 (copy-file
427 "Ext/Icons_15_VA/LowResIcons/KeePass_LR.ico"
428 "KeePass/IconsKeePass.ico")
429 (copy-file
430 "Ext/Icons_15_VA/LowResIcons/KeePass_LR_G.ico"
431 "KeePass/IconsKeePass_G.ico")
432 (copy-file
433 "Ext/Icons_15_VA/LowResIcons/KeePass_LR_R.ico"
434 "KeePass/IconsKeePass_R.ico")
435 (copy-file
436 "Ext/Icons_15_VA/LowResIcons/KeePass_LR_Y.ico"
437 "KeePass/IconsKeePass_Y.ico")
438 (substitute* "KeePassLib/KeePassLib.csproj"
439 ((" ToolsVersion=\\\"3\\.5\\\"")
440 " ToolsVersion=\"4.0\"")
441 (("<SignAssembly>true</SignAssembly>")
442 "<SignAssembly>false</SignAssembly>"))
443 (substitute* "Translation/TrlUtil/TrlUtil.csproj"
444 ((" ToolsVersion=\\\"3\\.5\\\"") " ToolsVersion=\"4.0\""))
445 (copy-file
446 "Ext/Icons_15_VA/LowResIcons/KeePass_LR.ico"
447 "KeePass/Resources/KeePass.ico")))
448 (delete 'patch-source)
449 (replace 'build
450 (lambda* (#:key outputs #:allow-other-keys)
451 (setenv "MONO_REGISTRY_PATH" "/dev/null")
452 (setenv "LANG" "C")
453 (setenv "LC_ALL" "C")
454 (invoke
455 "xbuild"
456 "KeePass.sln"
457 "/target:KeePass"
458 "/property:Configuration=Release"
459 "/property:CscToolExe=mcs"
460 "/verbosity:diagnostic")))
461 (replace 'install
462 (lambda* (#:key inputs #:allow-other-keys)
463 (let* ((script (string-append #$output "/bin/keepass"))
464 (mono (assoc-ref inputs "mono"))
465 (lib (string-append #$output "/lib/keepass")))
466 (install-file "KeePass/obj/Release/KeePass.exe" lib)
467 (install-file "Ext/KeePass.config.xml" lib)
468 (mkdir (string-append #$output "/bin"))
469 (call-with-output-file script
470 (lambda (port)
471 (format port "#!/bin/sh
472exec ~s/bin/mono ~s/lib/keepass/KeePass.exe \"$@\"
473"
474 mono #$output)))
475 (chmod script #o755)
476 (patch-shebang script)))))
477 #:tests? #f)) ;no tests
478 (native-inputs
479 (list unzip icoutils))
480 (inputs
481 (list mono libgdiplus libgcrypt glib gtk+))
482 (home-page "https://keepass.info/")
483 (synopsis
484 "Light-weight and easy-to-use password manager")
485 (description
486 "KeePass is a light-weight and easy-to-use password manager that helps
487you manage your passwords in a secure way. All passwords are stored
488in an encrypted database, which is locked with a master key or key file.")
489 (license license:gpl2)))
490
491(define-public keepass-diff
492 (package
493 (name "keepass-diff")
494 (version "1.2.0")
495 (source
496 (origin
497 (method url-fetch)
498 (uri (crate-uri "keepass-diff" version))
499 (file-name (string-append name "-" version ".tar.gz"))
500 (sha256
501 (base32 "0kk1rmp05cp5ia0d8jwkwy0926w3px444bwisg9nl0bxnffvcxib"))))
502 (build-system cargo-build-system)
503 (arguments
504 (list #:install-source? #f))
505 (inputs (cargo-inputs 'keepass-diff))
506 (home-page "https://github.com/Narigo/keepass-diff")
507 (synopsis "CLI tool to compare two Keepass (.kdbx) files")
508 (description
509 "This CLI-tool reads two Keepass (.kdbx) files and prints their differences.")
510 (properties '((tunable? . #t)))
511 (license license:expat)))
512
513(define-public pwsafe
514 (package
515 (name "pwsafe")
516 (version "3.72.2")
517 (home-page "https://www.pwsafe.org/")
518 (source
519 (origin
520 (method git-fetch)
521 (uri (git-reference
522 (url "https://github.com/pwsafe/pwsafe")
523 (commit version)))
524 (sha256
525 (base32 "1qkjjq2qdlvyypsqcx0j2aikrh0s7yq1w73n8snq7i9ymlxi4fnk"))
526 (file-name (git-file-name name version))))
527 (build-system cmake-build-system)
528 (arguments
529 (list
530 #:configure-flags
531 #~(list "-DGTEST_BUILD=OFF")))
532 (native-inputs
533 (list gettext-minimal googletest perl python-wrapper zip))
534 (inputs
535 (list curl
536 file
537 `(,util-linux "lib")
538 libxt
539 libxtst
540 openssl
541 qrencode
542 wxwidgets
543 xerces-c))
544 (synopsis "Password safe with automatic input and key generation")
545 (description "pwsafe is a password manager originally designed by Bruce
546Schneier. It offers a simple UI to manage passwords for different services.
547There are other programs that support the file format on different
548platforms.")
549 (license license:artistic2.0)))
550
551(define-public pwsafe-cli
552 (let ((commit "984fe38489c24602391e24150b450a37bfb866b7")
553 (revision "1"))
554 (package
555 (name "pwsafe-cli")
556 (version (git-version "0.2.0" revision commit))
557 (source
558 (origin
559 (method git-fetch)
560 (uri (git-reference
561 (url "https://github.com/nsd20463/pwsafe")
562 (commit commit)))
563 (sha256
564 (base32
565 "1fx0rhvl9ijjs9z5psxs990752rgw0558g7acjc0myx67ffxhhmy"))
566 (file-name (git-file-name name version))))
567 (build-system gnu-build-system)
568 (arguments
569 (list
570 #:phases
571 #~(modify-phases %standard-phases
572 (replace 'bootstrap
573 (lambda _
574 (invoke "aclocal")
575 (invoke "autoheader")
576 (invoke "automake" "--add-missing")
577 (invoke "autoconf"))))))
578 (native-inputs
579 (list autoconf automake))
580 (inputs
581 (list libx11 libxmu libxt openssl))
582 (home-page "https://github.com/nsd20463/pwsafe")
583 (synopsis "CLI password manager")
584 (description
585 "@command{pwsafe} is a command line tool compatible with
586Counterpane's Passwordsafe.")
587 (license license:gpl2+))))
588
589(define-public otpclient
590 (package
591 (name "otpclient")
592 (version "5.0.6")
593 (source
594 (origin
595 (method git-fetch)
596 (uri (git-reference
597 (url "https://github.com/paolostivanin/OTPClient")
598 (commit (string-append "v" version))))
599 (file-name (git-file-name name version))
600 (sha256
601 (base32 "1pcdfv0fbxpgznsm5ij0lis3nhm6c6pql4kx7xz2scbs594zw06f"))))
602 (build-system cmake-build-system)
603 (arguments
604 (list
605 #:modules `(((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
606 (guix build cmake-build-system)
607 (guix build utils))
608 #:imported-modules `((guix build glib-or-gtk-build-system)
609 ,@%cmake-build-system-modules)
610 #:tests? #f ; No tests
611 #:configure-flags
612 #~(list "-DENABLE_MINIMIZE_TO_TRAY=ON")
613 #:phases
614 #~(modify-phases %standard-phases
615 (add-after 'unpack 'generate-gdk-pixbuf-loaders-cache-file
616 (assoc-ref glib-or-gtk:%standard-phases
617 'generate-gdk-pixbuf-loaders-cache-file))
618 (add-after 'install 'glib-or-gtk-compile-schemas
619 (assoc-ref glib-or-gtk:%standard-phases
620 'glib-or-gtk-compile-schemas))
621 (add-after 'glib-or-gtk-compile-schemas 'glib-or-gtk-wrap
622 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
623 (inputs (list adwaita-icon-theme
624 bash-completion
625 `(,glib "bin") ;for glib-compile-resources
626 gtk
627 jansson
628 libadwaita
629 libcotp
630 libgcrypt
631 libsecret
632 libzip
633 protobuf-c
634 qrencode
635 zbar))
636 (native-inputs (list pkg-config))
637 (home-page "https://github.com/paolostivanin/OTPClient")
638 (synopsis "Two-factor authentication client")
639 (description "OTPClient is a GTK+-based @acronym{OTP, One Time Password}
640client, supporting @acronym{TOTP, Time-based one time passwords} and
641@acronym{HOTP,HMAC-based one time passwords}.")
642 (license license:gpl3)))
643
644(define-public shroud
645 (package
646 (name "shroud")
647 (version "0.1.2")
648 (source
649 (origin
650 (method url-fetch)
651 (uri (string-append "https://files.dthompson.us/shroud/shroud-"
652 version ".tar.gz"))
653 (sha256
654 (base32
655 "1l2shrhvcwfzkar9qiwb75nhcqmx25iz55lzmz0c187nbjhqzi9p"))))
656 (build-system gnu-build-system)
657 (arguments
658 (list
659 #:modules '((guix build gnu-build-system)
660 (guix build utils)
661 (ice-9 popen)
662 (ice-9 rdelim))
663 #:phases
664 #~(modify-phases %standard-phases
665 (add-after 'install 'wrap-shroud
666 (lambda _
667 (let* ((effective
668 (read-line
669 (open-pipe*
670 OPEN_READ
671 (string-append #$(this-package-input "guile")
672 "/bin/guile")
673 "-c" "(display (effective-version))")))
674 (ccachedir (string-append #$output
675 "/lib/guile/" effective
676 "/site-ccache")))
677 (wrap-program (string-append #$output "/bin/shroud")
678 `("GUILE_LOAD_COMPILED_PATH" ":" prefix (,ccachedir)))))))))
679 (inputs
680 (list bash-minimal guile-2.2 gnupg xclip))
681 (native-inputs
682 (list pkg-config))
683 (synopsis "GnuPG-based secret manager")
684 (description "Shroud is a simple secret manager with a command line
685interface. The password database is stored as a Scheme s-expression and
686encrypted with a GnuPG key. Secrets consist of an arbitrary number of
687key/value pairs, making Shroud suitable for more than just password storage.
688For copying and pasting secrets into web browsers and other graphical
689applications, there is xclip integration." )
690 (home-page "https://dthompson.us/projects/shroud.html")
691 (license license:gpl3+)))
692
693(define-public sops
694 (package
695 (name "sops")
696 (version "3.13.3")
697 (source
698 (origin
699 (method git-fetch)
700 (uri (git-reference
701 (url "https://github.com/getsops/sops")
702 (commit (string-append "v" version))))
703 (file-name (git-file-name name version))
704 (sha256
705 (base32 "08cfc9mcy6rmj025qzq4fg71bvibrcskyj00rnmcla89199f3d2c"))))
706 (build-system go-build-system)
707 (arguments
708 (list #:install-source? #f
709 #:unpack-path "github.com/getsops/sops/v3"
710 #:import-path "github.com/getsops/sops/v3/cmd/sops"
711 #:build-flags
712 #~(list (string-append
713 "-ldflags="
714 "-X github.com/getsops/sops/v3/version.Version="
715 #$(package-version this-package)))
716 #:modules
717 '(((guix build gnu-build-system) #:prefix gnu:)
718 (guix build go-build-system)
719 (guix build utils))
720 #:phases
721 #~(modify-phases %standard-phases
722 (replace 'install-license-files
723 (lambda _
724 (define license
725 (string-append #$output "/share/doc/" #$name
726 "-" #$(package-version this-package)))
727 (install-file "./src/github.com/getsops/sops/v3/LICENSE"
728 license))))))
729 (native-inputs
730 (list go-cloud-google-com-go-kms
731 go-cloud-google-com-go-storage
732 go-filippo-io-age
733 go-github-com-aws-aws-sdk-go-v2
734 go-github-com-aws-aws-sdk-go-v2-config
735 go-github-com-aws-aws-sdk-go-v2-credentials
736 go-github-com-aws-aws-sdk-go-v2-feature-s3-manager
737 go-github-com-aws-aws-sdk-go-v2-service-kms
738 go-github-com-aws-aws-sdk-go-v2-service-s3
739 go-github-com-aws-aws-sdk-go-v2-service-sts
740 go-github-com-azure-azure-sdk-for-go-sdk-azcore
741 go-github-com-azure-azure-sdk-for-go-sdk-azidentity
742 go-github-com-azure-azure-sdk-for-go-sdk-security-keyvault-azkeys
743 go-github-com-blang-semver
744 go-github-com-envoyproxy-go-control-plane
745 go-github-com-fatih-color
746 go-github-com-getsops-gopgagent
747 go-github-com-go-viper-mapstructure-v2
748 go-github-com-google-go-cmp
749 go-github-com-google-shlex
750 go-github-com-goware-prefixer
751 go-github-com-hashicorp-go-cleanhttp
752 go-github-com-hashicorp-vault-api
753 go-github-com-huaweicloud-huaweicloud-sdk-go-v3
754 go-github-com-lib-pq
755 go-github-com-mitchellh-go-homedir
756 go-github-com-mitchellh-go-wordwrap
757 ;; go-github-com-ory-dockertest-v3 ;for integration tests
758 go-github-com-pkg-errors
759 go-github-com-protonmail-go-crypto
760 go-github-com-sirupsen-logrus
761 go-github-com-stretchr-testify
762 go-github-com-urfave-cli
763 go-go-yaml-in-yaml-v3
764 go-golang-org-x-crypto
765 go-golang-org-x-net
766 go-golang-org-x-oauth2
767 go-golang-org-x-sys
768 go-golang-org-x-term
769 go-google-golang-org-api
770 go-google-golang-org-genproto-googleapis-rpc
771 go-google-golang-org-grpc
772 go-google-golang-org-protobuf
773 go-gopkg-in-ini-v1))
774 (home-page "https://getsops.io")
775 (synopsis "Tool for managing secrets")
776 (description
777 "sops is an editor of encrypted files that supports YAML, JSON,
778ENV, INI and BINARY formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault,
779age, and PGP.")
780 (license license:mpl2.0)))
781
782(define-public ssh-to-age
783 (package
784 (name "ssh-to-age")
785 (version "1.3.0")
786 (source
787 (origin
788 (method git-fetch)
789 (uri (git-reference
790 (url "https://github.com/Mic92/ssh-to-age")
791 (commit (string-append "v" version))))
792 (file-name (git-file-name name version))
793 (sha256
794 (base32 "1j5hyqpik25zgdan8vp3c13fii4pn640xhf2qd6wg64fj28zxrcg"))))
795 (build-system go-build-system)
796 (arguments
797 '(#:import-path "github.com/Mic92/ssh-to-age/cmd/ssh-to-age"
798 #:unpack-path "github.com/Mic92/ssh-to-age"))
799 (inputs (list go-golang-org-x-crypto
800 go-filippo-io-edwards25519
801 go-filippo-io-age))
802 (home-page "https://github.com/Mic92/ssh-to-age")
803 (synopsis "Convert SSH @code{ed25519} keys to @code{age} keys")
804 (description "This package provides a simple command-line tool to
805convert SSH @code{ed25519} keys to @code{age} keys.")
806 (license license:expat)))
807
808(define-public vaultwarden
809 (package
810 (name "vaultwarden")
811 (version "1.37.1")
812 (source
813 (origin
814 (method git-fetch)
815 (uri (git-reference
816 (url "https://github.com/dani-garcia/vaultwarden")
817 (commit version)))
818 (file-name (git-file-name name version))
819 (sha256
820 (base32 "0dx2077wfd672vi9d4pjk73gf5aaf42jyq5kxb9q4xs8x585sbs1"))))
821 (build-system cargo-build-system)
822 (arguments
823 (list
824 #:install-source? #f
825 #:rust rust-1.95
826 #:features '(list "sqlite_system" "s3" "postgresql")
827 ;; The build.rs script mandates the activation of a DB backend.
828 #:cargo-test-flags
829 '(list
830 "--features"
831 "sqlite_system,s3,postgresql"
832 "--")
833 #:cargo-install-paths ''(".")))
834 (inputs
835 (cons* openssl
836 postgresql
837 sqlite
838 `(,zstd "lib")
839 (cargo-inputs 'vaultwarden)))
840 (native-inputs (list pkg-config))
841 (home-page "https://github.com/dani-garcia/vaultwarden")
842 (synopsis
843 "Alternative implementation of the Bitwarden server API")
844 (description
845 "Vaultwarden is an unofficial Bitwarden server implementation written in
846Rust. It is compatible with the official Bitwarden clients, and is ideal for
847self-hosted deployments where running the official resource-heavy service is
848undesirable.
849
850Supported features are:
851@itemize
852@item Personal vault support
853@item Organization vault support
854@item Groups
855@item Event Logs
856@item Password sharing and access control
857@item Collections
858@item File attachments
859@item Folders
860@item Favorites
861@item Website icons
862@item Bitwarden Authenticator (TOTP)
863@item Bitwarden Send
864@item Emergency Access
865@item Trash (soft delete, you can configure the days for automatic deletion)
866@item Master password re-prompt
867@item Personal API key
868@item Two-step login via email, Duo, YubiKey, and FIDO2 WebAuthn
869@item Username generator integration
870@item Directory Connector support
871@item Account Recovery (this requires mail to be enabled)
872@item Live sync (WebSocket only) for desktop/browser clients/extensions
873@item Live sync (push notifications) for mobile clients (Android/iOS)
874@item Single Sign-On (SSO)
875@end itemize
876")
877 (license license:agpl3)))
878
879(define-public yapet
880 (package
881 (name "yapet")
882 (version "2.6")
883 (source
884 (origin
885 (method url-fetch)
886 (uri (string-append "https://yapet.guengel.ch/downloads/yapet-"
887 version ".tar.xz"))
888 (sha256
889 (base32 "00k38n5vlxl73m11pp1v50fqf702lv86hzwgj0qca6qxqz4i3jjl"))))
890 (build-system gnu-build-system)
891 (arguments
892 (list
893 #:configure-flags
894 #~(list (string-append "--docdir=" #$output "/share/doc/"
895 #$name "-" #$version))))
896 (inputs
897 (list argon2 ncurses openssl))
898 (native-inputs
899 (list cppunit pkg-config))
900 (synopsis "Yet Another Password Encryption Tool")
901 (description "YAPET is a text based password manager using the Blowfish
902encryption algorithm. Because of its small footprint and very few library
903dependencies, it is suited for installing on desktop and server systems alike.
904The text based user interface allows you to run YAPET easily in a Secure Shell
905session. Two companion utilities enable users to convert CSV files to YAPET
906and vice versa.")
907 (home-page "https://yapet.guengel.ch/")
908 (license license:gpl3+)))
909
910(define-public cracklib
911 (package
912 (name "cracklib")
913 (version "2.10.3")
914 (source
915 (origin
916 (method git-fetch)
917 (uri (git-reference
918 (url "https://github.com/cracklib/cracklib/")
919 (commit (string-append "v" version))))
920 (sha256
921 (base32
922 "037ybxmxap39bjhfajyxnmn8612k638qilfv9r90s6qkxs6lj6ir"))
923 (file-name (git-file-name name version))))
924 (build-system gnu-build-system)
925 (arguments
926 (list
927 #:phases
928 #~(modify-phases %standard-phases
929 (add-before 'bootstrap 'chdir
930 (lambda _ (chdir "src"))))))
931 (native-inputs
932 (list autoconf automake libtool intltool))
933 (synopsis "Password checking library")
934 (home-page "https://github.com/cracklib/cracklib")
935 (description
936 "CrackLib is a library containing a C function which may be used in a
937@command{passwd}-like program. The idea is simple: try to prevent users from
938choosing passwords that could easily be guessed (or \"cracked\") by filtering
939them out, at the source.")
940 (license license:lgpl2.1)))
941
942(define-public libpwquality
943 (package
944 (name "libpwquality")
945 (version "1.4.5")
946 (source (origin
947 (method url-fetch)
948 (uri (list
949 (string-append "https://github.com/libpwquality/libpwquality"
950 "/releases/download/libpwquality-" version
951 "/libpwquality-" version ".tar.bz2")
952 (string-append "https://launchpad.net/libpwquality/trunk/"
953 version "/+download/"
954 "libpwquality-" version ".tar.bz2")))
955 (sha256
956 (base32
957 "1209l7ba51rjsq724hi8my0s11xpslp9hhif9p89jp9hbnviikvg"))))
958 (build-system gnu-build-system)
959 (arguments
960 (list
961 #:phases
962 #~(modify-phases %standard-phases
963 (add-before 'configure 'set-LDFLAGS
964 (lambda _
965 (setenv "LDFLAGS"
966 (string-append "-Wl,-rpath=" #$output "/lib")))))))
967 (native-inputs
968 (list python-setuptools python-wrapper))
969 (inputs
970 (list cracklib))
971 (synopsis "Password quality checker")
972 (home-page "https://github.com/libpwquality/libpwquality")
973 (description
974 "Libpwquality is a library for password quality checking and generation of
975random passwords that pass the checks.")
976 (license license:gpl2+)))
977
978(define-public passwdqc
979 (package
980 (name "passwdqc")
981 (version "2.1.0")
982 (source
983 (origin
984 (method git-fetch)
985 (uri (git-reference
986 (url "https://github.com/openwall/passwdqc/")
987 (commit (string-append "v" version))))
988 (file-name (git-file-name name version))
989 (sha256
990 (base32
991 "1717kn9jdhgga140jfscbjijxcid8zpk040l2phy3rq0hvqjgkgg"))))
992 (build-system gnu-build-system)
993 (arguments
994 (list
995 #:tests? #f ; no tests provided
996 #:make-flags
997 #~(list (string-append "CC=" #$(cc-for-target))
998 (string-append "DESTDIR=" #$output) ; no $prefix support
999 "BINDIR=/bin"
1000 "DEVEL_LIBDIR=/lib"
1001 "SHARED_LIBDIR_REL=."
1002 "INCLUDEDIR=/include"
1003 "MANDIR=/share/man"
1004 (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
1005 #:phases
1006 #~(modify-phases %standard-phases
1007 (delete 'configure)))) ;no configure script
1008 (inputs (list linux-pam libxcrypt))
1009 (home-page "https://www.openwall.com/passwdqc/")
1010 (synopsis
1011 "Password/passphrase strength checking and policy enforcement toolset")
1012 (description
1013 "Passwdqc is a password/passphrase strength checking and policy
1014enforcement toolset, including an optional PAM module, @code{pam_passwdqc},
1015command-line programs (@command{pwqcheck}, @command{pwqfilter}, and
1016@command{pwqgen}), and a library, @code{libpasswdqc}.")
1017 (license (list license:bsd-3 ;manual pages
1018 license:bsd-1)))) ;code
1019
1020(define-public impass
1021 (package
1022 (name "impass")
1023 (version "0.14.1")
1024 (source
1025 (origin
1026 (method url-fetch)
1027 (uri (list
1028 (string-append
1029 "http://deb.debian.org/debian/pool/main/i/impass/"
1030 "impass_" version ".orig.tar.gz")))
1031 (sha256
1032 (base32
1033 "0jsssp5f2mssywxnja87aq1p2k24rjjz361b8if4kfixwi44rr5a"))))
1034 (arguments
1035 (list
1036 ;; irritatingly, tests do run but not there are two problems:
1037 ;; - "import gtk" fails for unknown reasons here despite it the
1038 ;; program working (indeed, I've found I have to do a logout and log
1039 ;; back in in after an install order for some mumbo jumbo environment
1040 ;; variable mess to work with pygtk and assword... what's up with
1041 ;; that?)
1042 ;; - even when the tests fail, they don't return a nonzero status,
1043 ;; so I'm not sure how to programmatically get that information
1044 #:tests? #f
1045 #:phases
1046 #~(modify-phases %standard-phases
1047 (add-after 'wrap 'wrap-impass
1048 (lambda _
1049 (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")))
1050 (wrap-program (string-append #$output "/bin/impass")
1051 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))
1052 (add-after 'install 'manpage
1053 (lambda _
1054 (invoke "make" "impass.1")
1055 (install-file "impass.1"
1056 (string-append #$output "/share/man/man1")))))))
1057 (build-system pyproject-build-system)
1058 (inputs
1059 (list bash-minimal gtk gobject-introspection python-i3ipc python-xdo
1060 python-gpg python-pygobject))
1061 (propagated-inputs
1062 (list xclip))
1063 (native-inputs
1064 (list txt2man python-setuptools))
1065 (home-page "https://finestructure.net/impass/")
1066 (synopsis "Password manager")
1067 (description "impass is a simple password manager using GPG-wrapped
1068JSON files. It has a command line interface as well as a very simple
1069graphical interface, which can even \"type\" your passwords into
1070any X11 window.")
1071 (license license:gpl3+)))
1072
1073(define-deprecated-package assword impass)
1074
1075(define-public password-store
1076 (package
1077 (name "password-store")
1078 (version "1.7.4")
1079 (source
1080 (origin
1081 (method git-fetch)
1082 (uri (git-reference
1083 (url "git://git.zx2c4.com/password-store")
1084 (commit version)))
1085 (sha256
1086 (base32
1087 "17zp9pnb3i9sd2zn9qanngmsywrb7y495ngcqs6313pv3gb83v53"))
1088 (patches (search-patches "password-store-tree-compat.patch"))
1089 (file-name (git-file-name name version))))
1090 (build-system gnu-build-system)
1091 (arguments
1092 (list
1093 #:make-flags
1094 #~(list (string-append "CC=" #$(cc-for-target))
1095 (string-append "PREFIX=" #$output)
1096 "WITH_ALLCOMP=yes"
1097 (string-append "BASHCOMPDIR="
1098 #$output "/share/bash-completion/completions"))
1099 ;; Parallel tests may cause a race condition leading to a
1100 ;; timeout in some circumstances.
1101 #:parallel-tests? #f
1102 #:test-target "test"
1103 #:phases
1104 #~(modify-phases %standard-phases
1105 (delete 'configure)
1106 (delete 'build)
1107 (add-before 'install 'patch-system-extension-dir
1108 (lambda _
1109 (substitute* "src/password-store.sh"
1110 (("^SYSTEM_EXTENSION_DIR=.*$")
1111 ;; lead with whitespace to prevent 'make install' from
1112 ;; overwriting it again
1113 (string-append
1114 " SYSTEM_EXTENSION_DIR=\""
1115 "${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
1116 (string-append #$output "/lib/password-store/extensions")
1117 "}\"\n")))))
1118 (add-before 'install 'patch-program-name
1119 ;; Use pass not .pass-real in tmpdir and cmd_usage
1120 (lambda _
1121 (substitute* "src/password-store.sh"
1122 (("^PROGRAM=.*$")
1123 "PROGRAM=\"pass\"\n"))))
1124 (add-before 'install 'patch-passmenu-path
1125 ;; FIXME Wayland support requires ydotool and dmenu-wl packages
1126 ;; We are ignoring part of the script that gets executed if
1127 ;; WAYLAND_DISPLAY env variable is set, leaving dmenu-wl and ydotool
1128 ;; commands as is.
1129 (lambda* (#:key inputs #:allow-other-keys)
1130 (substitute* "contrib/dmenu/passmenu"
1131 (("dmenu=dmenu\n")
1132 (string-append
1133 "dmenu=" (search-input-file inputs "/bin/dmenu") "\n"))
1134 (("xdotool=\"xdotool")
1135 (string-append
1136 "xdotool=\"" (search-input-file inputs "/bin/xdotool"))))))
1137 (add-after 'install 'install-passmenu
1138 (lambda _
1139 (install-file
1140 "contrib/dmenu/passmenu" (string-append #$output "/bin"))))
1141 (add-after 'install 'wrap-path
1142 (lambda* (#:key inputs #:allow-other-keys)
1143 (let* ((requisites '("getopt" "git" "gpg" "qrencode" "sed"
1144 "tail" "tree" "which" "wl-copy" "xclip"))
1145 (path
1146 (map (lambda (pkg)
1147 (dirname (search-input-file
1148 inputs (string-append "/bin/" pkg))))
1149 requisites)))
1150 (wrap-program (string-append #$output "/bin/pass")
1151 `("PATH" ":" prefix (,(string-join path ":"))))))))))
1152 (native-search-paths
1153 (list (search-path-specification
1154 (variable "PASSWORD_STORE_SYSTEM_EXTENSION_DIR")
1155 (separator #f) ;single entry
1156 (files '("lib/password-store/extensions")))))
1157 (inputs
1158 (list bash-minimal
1159 coreutils
1160 dmenu
1161 git
1162 gnupg
1163 qrencode
1164 sed
1165 tree
1166 util-linux
1167 which
1168 wl-clipboard
1169 xclip
1170 xdotool))
1171 (home-page "https://www.passwordstore.org/")
1172 (synopsis "Encrypted password manager")
1173 (description "Password-store is a password manager which uses GnuPG to
1174store and retrieve passwords. The tool stores each password in its own
1175GnuPG-encrypted file, allowing the program to be simple yet secure.
1176Synchronization is possible using the integrated git support, which commits
1177changes to your password database to a git repository that can be managed
1178through the pass command.")
1179 (license license:gpl2+)))
1180
1181(define-public pass-age
1182 (package
1183 (inherit password-store)
1184 (name "pass-age")
1185 (version "1.7.4a2")
1186 (source
1187 (origin
1188 (method git-fetch)
1189 (uri (git-reference
1190 (url "https://github.com/FiloSottile/passage")
1191 (commit version)))
1192 (file-name (git-file-name name version))
1193 (sha256
1194 (base32 "1ap2i08zjvacd2rllrsx9bw3zz5i99bk0i5yxrssvn6w60bwjqdl"))))
1195 (build-system copy-build-system)
1196 (arguments
1197 (list
1198 #:modules '((guix build copy-build-system)
1199 (guix build utils)
1200 (srfi srfi-26))
1201 #:phases
1202 #~(modify-phases %standard-phases
1203 (add-after 'unpack 'rename-script
1204 (lambda _
1205 (rename-file "src/password-store.sh"
1206 "src/passage")))
1207 (add-after 'install 'wrap-script
1208 (lambda* (#:key inputs #:allow-other-keys)
1209 (let* ((script (string-append #$output "/bin/passage")))
1210 (substitute* script
1211 ;; Avoid ugly ‘.passage-real’ in --help output and elsewhere.
1212 (("^(PROGRAM=).*" _ program=)
1213 (string-append program= (basename script) "\n")))
1214 (wrap-program script
1215 `("PATH" ":" prefix
1216 ,(map dirname
1217 (map (cut search-input-file inputs <>)
1218 (list "bin/age"
1219 "bin/age-keygen"
1220 "bin/cat"
1221 "bin/getopt"
1222 "bin/git"
1223 "bin/pkill"
1224 "bin/qrencode"
1225 "bin/sed"
1226 "bin/tree")))))))))
1227 #:install-plan
1228 #~'(("src/passage" "/bin/")
1229 ("src/completion/pass.bash-completion"
1230 "/share/bash-completion/completions/passage")
1231 ("src/completion/pass.fish-completion"
1232 "/share/fish/vendor_completions.d/passage")
1233 ("src/completion/pass.zsh-completion"
1234 "/share/zsh/site-functions/_passage"))))
1235 (inputs
1236 (list age coreutils-minimal git-minimal
1237 procps qrencode sed tree util-linux))
1238 (home-page "https://github.com/FiloSottile/passage")
1239 (synopsis "Encrypted password manager")
1240 (description "This package provides an encrypted password manager, forked
1241from the @code{password-store} package. Files are encrypted with the
1242@command{age} encryption package with small explicit keys.")
1243 (license license:gpl2+)))
1244
1245(define-public pass-otp
1246 (package
1247 (name "pass-otp")
1248 (version "1.2.0")
1249 (source
1250 (origin
1251 (method url-fetch)
1252 (uri
1253 (string-append "https://github.com/tadfisher/pass-otp/releases/"
1254 "download/v" version "/pass-otp-" version ".tar.gz"))
1255 (sha256
1256 (base32
1257 "0rrs3iazq80dn0wbl20xkh270428jd8l99m5gd7hl93s4r4sc82p"))))
1258 (build-system gnu-build-system)
1259 (arguments
1260 (list
1261 #:make-flags
1262 #~(list (string-append "PREFIX=" #$output)
1263 (string-append
1264 "BASHCOMPDIR="
1265 (string-append #$output "/etc/bash_completion.d")))
1266 #:phases
1267 #~(modify-phases %standard-phases
1268 (delete 'configure)
1269 (add-after 'build 'patch-oath-path
1270 (lambda* (#:key inputs #:allow-other-keys)
1271 (substitute* "otp.bash"
1272 (("^OATH=.*$")
1273 (string-append
1274 "OATH="
1275 (assoc-ref inputs "oath-toolkit")
1276 "/bin/oathtool\n"))
1277 ;; courtesy: https://github.com/tadfisher/pass-otp/pull/172
1278 (("&counter=[$]counter" all)
1279 (format #f "~s" all))))))
1280 #:test-target "test"))
1281 (native-inputs
1282 (list password-store expect git gnupg which))
1283 (inputs
1284 (list oath-toolkit))
1285 (home-page "https://github.com/tadfisher/pass-otp")
1286 (synopsis "Pass extension for managing one-time-password (OTP) tokens")
1287 (description
1288 "Pass OTP is an extension for password-store that allows adding
1289one-time-password (OTP) secrets, generating OTP codes, and displaying secret
1290key URIs using the standard otpauth:// scheme.")
1291 (license license:gpl3+)))
1292
1293(define-public pass-update
1294 (package
1295 (name "pass-update")
1296 (version "2.2.1")
1297 (source
1298 (origin
1299 (method git-fetch)
1300 (uri (git-reference
1301 (url "https://github.com/roddhjav/pass-update")
1302 (commit (string-append "v" version))))
1303 (file-name (git-file-name name version))
1304 (sha256
1305 (base32 "1srg0zpgfj2rcsc8aynq7jy2wd9l2h21rpp73si6rwiccff4ymrl"))))
1306 (build-system gnu-build-system)
1307 (arguments
1308 (list
1309 #:test-target "tests"
1310 #:make-flags
1311 #~(list (string-append "PREFIX="
1312 #$output)
1313 (string-append "BASHCOMPDIR="
1314 #$output "/share/bash-completion/completions"))
1315 #:phases
1316 #~(modify-phases %standard-phases
1317 (delete 'build)
1318 (add-before 'check 'setenv
1319 (lambda _
1320 ;; Tests need the env var TMP
1321 (mkdir "/tmp/pw")
1322 (setenv "TMP" "/tmp/pw")))
1323 (delete 'configure))))
1324 (native-inputs (list password-store gnupg git))
1325 (home-page "https://github.com/roddhjav/pass-update")
1326 (synopsis "Extension to @code{password-store} for updating passwords")
1327 (description
1328 "@code{pass-update} extends the pass utility with an update command
1329providing an easy flow for updating passwords. It supports path, directory
1330and wildcard update. Moreover, you can select how to update your passwords by
1331automatically generating new passwords or manually setting your own.")
1332 (license license:gpl3)))
1333
1334(define-public qtpass
1335 (package
1336 (name "qtpass")
1337 (version "1.7.0")
1338 (source
1339 (origin
1340 (method git-fetch)
1341 (uri (git-reference
1342 (url "https://github.com/IJHack/QtPass")
1343 (commit (string-append "v" version))))
1344 (file-name (git-file-name name version))
1345 (sha256
1346 (base32 "1xx7ccvs9wvqfd8y5vm5n3qmcpfsryqzlb0ip1i19vrgdqrwm9nj"))))
1347 (build-system qt-build-system)
1348 (arguments
1349 (list
1350 #:qtbase qtbase
1351 #:modules '((guix build qt-build-system)
1352 ((guix build gnu-build-system) #:prefix gnu:)
1353 (guix build utils))
1354 #:phases
1355 #~(modify-phases %standard-phases
1356 (replace 'configure
1357 (lambda* (#:key inputs #:allow-other-keys)
1358 ;; Though qtpass.pri has variables QMAKE_LRELEASE and
1359 ;; QMAKE_LUPDATE, they are somehow discarded.
1360 (invoke "qmake6"
1361 "QMAKE_CXXFLAGS=-Wno-unused-parameter"
1362 (string-append
1363 "QT_TOOL.lrelease.binary="
1364 (search-input-file inputs "/bin/lrelease"))
1365 (string-append
1366 "QT_TOOL.lupdate.binary="
1367 (search-input-file inputs "/bin/lupdate"))
1368 (string-append "PREFIX=" #$output))))
1369 (replace 'build (assoc-ref gnu:%standard-phases 'build))
1370 (replace 'check (assoc-ref gnu:%standard-phases 'check))
1371 (add-before 'check 'pre-check
1372 ;; Fontconfig needs a writable cache.
1373 (lambda _ (setenv "HOME" "/tmp")))
1374 (replace 'install (assoc-ref gnu:%standard-phases 'install))
1375 (add-after 'install 'install-auxilliary
1376 ;; Install man-page, icon and .desktop file.
1377 (lambda _
1378 (let ((applications (string-append #$output "/share/applications"))
1379 (icons (string-append #$output "/share/icons/hicolor/scalable/apps"))
1380 (man (string-append #$output "/share/man/man1")))
1381 (install-file "qtpass.desktop" applications)
1382 (install-file "artwork/icon.svg" icons)
1383 (rename-file (string-append icons "/icon.svg")
1384 (string-append icons "/qtpass-icon.svg"))
1385 (install-file "qtpass.1" man)))))))
1386 (native-inputs
1387 (list qttools))
1388 (inputs
1389 (list qtsvg))
1390 (home-page "https://qtpass.org")
1391 (synopsis "GUI for password manager password-store")
1392 (description
1393 "Qt-based graphical user interface for the password manager
1394password-store also known as pass. Can use either pass or gpg to interact
1395with password-store files. Features configurable password generation,
1396templates, clipboard handling, and per folder settings for multi-recipient
1397encryption.")
1398 (license license:gpl3+)))
1399
1400(define-public rofi-pass
1401 ;; No release in over 5 years with recent commits adding features like
1402 ;; Wayland support.
1403 (let ((commit "8aa6b9293a8f0af267425326fa966966ca42085e")
1404 (revision "0"))
1405 (package
1406 (name "rofi-pass")
1407 (version (git-version "2.0.2" revision commit))
1408 (source
1409 (origin
1410 (method git-fetch)
1411 (uri (git-reference
1412 (url "https://github.com/carnager/rofi-pass")
1413 (commit commit)))
1414 (sha256
1415 (base32
1416 "0axz4ijp6fay6f2yn1cg6223l89jkg8wnxslbk1g5jpli0njxw43"))
1417 (file-name (git-file-name name version))))
1418 (build-system gnu-build-system)
1419 (arguments
1420 (list #:tests? #f ; no tests
1421 #:make-flags #~(list (string-append "PREFIX=" #$output))
1422 #:phases
1423 #~(modify-phases %standard-phases
1424 (add-after 'unpack 'fix-etc-path
1425 (lambda _
1426 (substitute* "Makefile"
1427 (("\\$\\(DESTDIR\\)/etc")
1428 (string-append #$output "/etc")))
1429 (substitute* "rofi-pass"
1430 (("/etc")
1431 (string-append #$output "/etc")))))
1432 (delete 'configure) ; no configure
1433 (delete 'build) ; no build
1434 (add-after 'install 'wrap-path
1435 (lambda* (#:key inputs #:allow-other-keys)
1436 (let ((bin (string-append #$output "/bin")))
1437 (for-each
1438 (lambda (script)
1439 (wrap-program (string-append bin "/" script)
1440 (list "PATH" 'prefix
1441 (map
1442 (lambda (binary)
1443 (dirname (search-input-file
1444 inputs
1445 (string-append "bin/" binary))))
1446 '("pass" "pwgen" "rofi"
1447 "xclip" "xdotool" "xset")))))
1448 (list "addpass" "rofi-pass"))))))))
1449 (inputs (list bash-minimal ;for wrap-program
1450 password-store
1451 pwgen
1452 rofi
1453 xclip
1454 xdotool
1455 xset))
1456 (home-page "https://github.com/carnager/rofi-pass")
1457 (synopsis "Rofi frontend for password-store")
1458 (description "Rofi-pass provides a way to manipulate information stored
1459using password-store through rofi interface:
1460@enumerate
1461@item open URLs of entries with hotkey;
1462@item type any field from entry;
1463@item auto-typing of user and/or password fields;
1464@item auto-typing username based on path;
1465@item auto-typing of more than one field, using the autotype entry;
1466@item bookmarks mode (open stored URLs in browser, default: Alt+x).
1467@end enumerate")
1468 (license license:gpl3))))
1469
1470(define-public rofi-pass-wayland
1471 (package
1472 (inherit rofi-pass)
1473 (name "rofi-pass-wayland")
1474 (arguments
1475 (substitute-keyword-arguments arguments
1476 ((#:phases phases)
1477 #~(modify-phases #$phases
1478 ;; Set the clipboard and backend tools to ones for Wayland in the
1479 ;; default configuration file.
1480 (add-after 'fix-etc-path 'set-wayland-defaults
1481 (lambda _
1482 (substitute* "config.example"
1483 ;; Note the typo in current configuration.
1484 (("#clibpoard_backend=xclip")
1485 "clipboard_backend=wl-clipboard")
1486 (("#backend=xdotool")
1487 "backend=wtype"))))
1488 ;; Use Wayland related tools instead.
1489 (replace 'wrap-path
1490 (lambda* (#:key inputs #:allow-other-keys)
1491 (let ((bin (string-append #$output "/bin")))
1492 (for-each
1493 (lambda (script)
1494 (wrap-program (string-append bin "/" script)
1495 (list "PATH" 'prefix
1496 (map
1497 (lambda (binary)
1498 (dirname (search-input-file
1499 inputs
1500 (string-append "bin/" binary))))
1501 ;; wl-copy for wl-clipboard.
1502 '("pass" "pwgen" "rofi" "wl-copy" "wtype")))))
1503 (list "addpass" "rofi-pass")))))))))
1504 (inputs
1505 (modify-inputs inputs
1506 (replace "xclip" wl-clipboard)
1507 (replace "xdotool" wtype)
1508 (delete "xset")))
1509 (description (string-append
1510 (package-description rofi-pass)
1511 "\nThis package provides Wayland support by default."))))
1512
1513(define-public tessen
1514 (package
1515 (name "tessen")
1516 (version "2.2.3")
1517 (source (origin
1518 (method git-fetch)
1519 (uri (git-reference
1520 (url "https://github.com/ayushnix/tessen/")
1521 (commit (string-append "v" version))))
1522 (file-name (git-file-name name version))
1523 (sha256
1524 (base32
1525 "0pxx3x50k1zi82vjvib94rar6sy5bz3s2amq4zyba6s1a8isqlcr"))))
1526 (build-system gnu-build-system)
1527 (arguments
1528 (list #:tests?
1529 #f ;no tests
1530 #:phases
1531 #~(modify-phases %standard-phases
1532 (add-after 'unpack 'patch-wtype-path
1533 (lambda* (#:key inputs #:allow-other-keys)
1534 (substitute* "tessen"
1535 (("notify-send") (search-input-file inputs
1536 "/bin/notify-send"))
1537 (("wl-copy") (search-input-file inputs "/bin/wl-copy"))
1538 (("wtype") (search-input-file inputs "/bin/wtype"))
1539 (("xdg-open") (search-input-file inputs "/bin/xdg-open")))))
1540 (delete 'configure)) ;no configure script
1541 #:make-flags
1542 #~(list (string-append "DESTDIR=" #$output)
1543 "PREFIX=''")))
1544 (native-inputs (list scdoc))
1545 (inputs (list libnotify wl-clipboard wtype xdg-utils))
1546 (home-page "https://github.com/ayushnix/tessen")
1547 (synopsis "Frontend for password-store and gopass")
1548 (description "Tessen is a bash script that can autotype and copy data
1549from password-store and gopass files.")
1550 (license license:gpl2)))
1551
1552(define-public browserpass-native
1553 (package
1554 (name "browserpass-native")
1555 (version "3.1.2")
1556 (source
1557 (origin
1558 (method git-fetch)
1559 (uri (git-reference
1560 (url "https://github.com/browserpass/browserpass-native")
1561 (commit (string-append "v" version))))
1562 (file-name (git-file-name name version))
1563 (sha256
1564 (base32 "1xskmb7jr42y000hab624dawri8lp4dyaq07j3cbfd6kphx7kjnf"))))
1565 (build-system go-build-system)
1566 (arguments
1567 (list #:import-path "github.com/browserpass/browserpass-native"
1568 #:install-source? #f
1569 #:phases
1570 #~(modify-phases %standard-phases
1571 (add-before 'build 'patch-makefile
1572 (lambda _
1573 ;; This doesn't go in #:make-flags because the Makefile
1574 ;; itself gets installed.
1575 (substitute* "src/github.com/browserpass/browserpass-native/Makefile"
1576 (("PREFIX \\?= /usr")
1577 (string-append "PREFIX ?= " #$output)))))
1578 (add-before 'build 'configure
1579 (lambda _
1580 (with-directory-excursion
1581 "src/github.com/browserpass/browserpass-native"
1582 (invoke "make" "configure"))))
1583 (replace 'build
1584 (lambda _
1585 (with-directory-excursion
1586 "src/github.com/browserpass/browserpass-native"
1587 (invoke "make"))))
1588 (replace 'install
1589 (lambda _
1590 (with-directory-excursion
1591 "src/github.com/browserpass/browserpass-native"
1592 (invoke "make" "install"))))
1593 (add-after 'install 'wrap-executable
1594 (lambda _
1595 (wrap-program (string-append #$output "/bin/browserpass")
1596 `("PATH" ":" prefix
1597 (,(string-append #$(this-package-input "gnupg") "/bin")))))))))
1598 (native-inputs
1599 (list which))
1600 (inputs
1601 (list bash-minimal gnupg go-github-com-mattn-go-zglob
1602 go-github-com-rifflock-lfshook go-github-com-sirupsen-logrus
1603 go-golang-org-x-sys))
1604 (home-page "https://github.com/browserpass/browserpass-native")
1605 (synopsis "Browserpass native messaging host")
1606 (description "Browserpass is a browser extension for pass, a
1607UNIX-based password store manager. It allows you to auto-fill or copy to
1608clipboard credentials for the current domain, protecting you from phishing
1609attacks.
1610
1611This package only contains the Browserpass native messaging host. You must
1612also install the browser extension for GNU IceCat or ungoogled-chromium
1613separately.")
1614 (license license:isc)))
1615
1616(define-public cpass
1617 (package
1618 (name "cpass")
1619 (version "0.9.5")
1620 (source (origin
1621 (method url-fetch)
1622 (uri (pypi-uri "cpass" version))
1623 (sha256
1624 (base32
1625 "010bf5dpcg0vc9wsay63nhn2wn5in2v40c3jn94d9qmxl67kqmn8"))))
1626 (build-system pyproject-build-system)
1627 (arguments
1628 (list #:tests? #f ;no tests
1629 #:phases
1630 #~(modify-phases %standard-phases
1631 (add-after 'unpack 'patch-pass-refs
1632 (lambda* (#:key inputs #:allow-other-keys)
1633 (substitute* "cpass.py"
1634 (("'pass'")
1635 (string-append "'"
1636 (search-input-file inputs
1637 "bin/pass")
1638 "'"))
1639 (("\\.password_store")
1640 ".password-store")))))))
1641 (native-inputs
1642 (list python-setuptools))
1643 (inputs (list password-store))
1644 (propagated-inputs (list python-urwid))
1645 (home-page "https://github.com/OliverLew/cpass")
1646 (synopsis "Textual interface for @command{pass}")
1647 (description
1648 "@command{cpass} is a terminal user interface for @command{pass}.
1649It supports both vim-like keybindings and the mouse.")
1650 (license license:expat)))
1651
1652(define-public argon2
1653 (package
1654 (name "argon2")
1655 (version "20190702")
1656 (source
1657 (origin
1658 (method git-fetch)
1659 (uri (git-reference
1660 (url "https://github.com/P-H-C/phc-winner-argon2")
1661 (commit version)))
1662 (file-name (git-file-name name version))
1663 (sha256
1664 (base32
1665 "01rwanr4wmr9vm6c712x411wig543q195z2icn388z892a93lc7p"))))
1666 (build-system gnu-build-system)
1667 (arguments
1668 `(#:test-target "test"
1669 #:make-flags (list (string-append "CC=" ,(cc-for-target))
1670 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1671 "LIBRARY_REL=lib"
1672 (string-append "ARGON2_VERSION=" ,version)
1673 "OPTTEST=1") ; disable CPU optimization
1674 #:phases
1675 (modify-phases %standard-phases
1676 (delete 'configure)))) ; No configure script.
1677 (home-page "https://www.argon2.com/")
1678 (synopsis "Password hashing library")
1679 (description "Argon2 provides a key derivation function that was declared
1680winner of the 2015 Password Hashing Competition.")
1681 ;; Argon2 is dual licensed under CC0 and ASL 2.0. Some of the source
1682 ;; files are CC0 only; see README.md and LICENSE for details.
1683 (license (list license:cc0 license:asl2.0))))
1684
1685(define-public secretsd
1686 ;; there are neither tags nor releases in the repository
1687 (let ((commit "d12eefee00dbd4b0f756dcf7c52d31539dbcfc67")
1688 (revision "1"))
1689 (package
1690 (name "secretsd")
1691 (version (git-version "1.0" revision commit))
1692 (source
1693 (origin
1694 (method git-fetch)
1695 (uri (git-reference
1696 (url "https://github.com/grawity/secretsd")
1697 (commit commit)))
1698 (file-name (git-file-name name version))
1699 (sha256
1700 (base32 "1cr6vpb1mc48b60mjbnzalp58vx07sh7hg9r65j0cppk0n4gc0aj"))
1701 (modules '((guix build utils)))
1702 (snippet
1703 ;; don't install platform dependencies
1704 #~(substitute* "setup.py" ((".*install_requires.*") "")))))
1705 (build-system pyproject-build-system)
1706 (arguments
1707 (list
1708 #:tests? #f ; no tests
1709 #:phases
1710 #~(modify-phases %standard-phases
1711 (add-after 'create-entrypoints 'wrap-program
1712 (lambda _
1713 (wrap-program (string-append #$output "/bin/secretsd")
1714 `("GI_TYPELIB_PATH" ":" prefix
1715 (,(getenv "GI_TYPELIB_PATH")))))))))
1716 (inputs (list python-dbus-1.2 python-platformdirs python-cryptography
1717 python-pygobject))
1718 (native-inputs (list bash-minimal python-setuptools python-wheel))
1719 (home-page "https://github.com/grawity/secretsd")
1720 (synopsis "Basic FreeDesktop.org Secret Service backend")
1721 (description
1722 "@code{secretsd} is a generic backend for the @code{libsecret} @acronym{API,
1723application programming interface} to use on headless systems or minimal desktop
1724environments. It stores secrets in a @code{sqlite} database, encrypted using a
1725@acronym{AES, Advanced Encryption Standard} key. The database key is stored in a
1726regular file next to the database by default, but can be read from an external
1727program.")
1728 (license license:expat))))
1729
1730(define-public pass-git-helper
1731 (package
1732 (name "pass-git-helper")
1733 (version "4.3.0")
1734 (source
1735 (origin
1736 (method git-fetch)
1737 (uri (git-reference
1738 (url "https://github.com/languitar/pass-git-helper")
1739 (commit (string-append "v" version))))
1740 (file-name (git-file-name name version))
1741 (sha256
1742 (base32
1743 "018kbpgffynhbxq79897m43cvxi7g688ycadmw92k68ilvrz26pw"))))
1744 (build-system pyproject-build-system)
1745 (arguments
1746 (list
1747 #:phases
1748 #~(modify-phases %standard-phases
1749 (add-before 'build 'set-home
1750 (lambda _
1751 (setenv "HOME" (getcwd)))))))
1752 (native-inputs
1753 (list python-pytest
1754 python-pytest-mock
1755 python-setuptools))
1756 (inputs
1757 (list password-store python-pyxdg))
1758 (home-page "https://github.com/languitar/pass-git-helper")
1759 (synopsis "Git credential helper interfacing with pass")
1760 (description "pass-git-helper is a git credential helper which
1761uses pass, the standard unix password manager, as the credential backend for
1762your git repositories. This is achieved by explicitly defining mappings
1763between hosts and entries in the password store.")
1764 (license license:lgpl3+)))
1765
1766(define-public john-the-ripper-jumbo
1767 (let ((official-version "1.9.0")
1768 (jumbo-version "1"))
1769 (package
1770 (name "john-the-ripper-jumbo")
1771 (version (string-append official-version "-" jumbo-version))
1772 (source
1773 (origin
1774 (method url-fetch)
1775 (uri (string-append "http://www.openwall.com/john/j/john-"
1776 official-version "-jumbo-" jumbo-version ".tar.xz"))
1777 (sha256
1778 (base32 "0fvz3v41hnaiv1ggpxanfykyfjq79cwp9qcqqn63vic357w27lgm"))
1779 (patches (search-patches "john-the-ripper-jumbo-with-gcc-11.patch"))))
1780 (build-system gnu-build-system)
1781 (native-inputs
1782 (list perl))
1783 (inputs
1784 (list gmp
1785 libpcap
1786 nss
1787 openssl
1788 python-wrapper
1789 ruby ; For genincstats.rb
1790 zlib))
1791 (arguments
1792 `(#:configure-flags
1793 (list "--with-systemwide"
1794 ;; Do not test for instruction set in configure, and do not
1795 ;; pass '-march=native' to gcc:
1796 "--disable-native-tests"
1797 "--disable-native-march"
1798 ,(string-append
1799 "--enable-simd="
1800 (let ((system (or (%current-target-system)
1801 (%current-system))))
1802 (cond
1803 ((or (string-prefix? "x86_64" system)
1804 (string-prefix? "i686" system)) "sse2")
1805 ((string-prefix? "aarch" system) "neon")
1806 (else "no")))))
1807 #:phases
1808 (modify-phases %standard-phases
1809 (add-before 'configure 'chdir-src
1810 (lambda _ (chdir "src") #t))
1811 (replace 'install
1812 (lambda _
1813 (let ((bindir (string-append %output "/bin"))
1814 (docdir (string-append %output "/share/doc/john"))
1815 (execdir (string-append %output "/libexec/john"))
1816 (datadir (string-append %output "/share/john"))
1817 (install-file-to (lambda (dir)
1818 (lambda (f) (install-file f dir))))
1819 (symlink? (lambda (_ s) (eq? (stat:type s) 'symlink))))
1820 (with-directory-excursion "../run"
1821 (for-each (install-file-to bindir)
1822 (cons*
1823 "john" "makechr" "cprepair" "SIPdump" "tgtsnarf"
1824 "genmkvpwd" "mkvcalcproba" "calc_stat" "raw2dyna"
1825 (find-files "." "(to|2)?john(-[^.]*)?$")))
1826 (for-each (lambda (f) ; Install symlinked aliases
1827 (let ((tgt (string-append bindir "/" (basename f))))
1828 ;; The use of install-file above dereferences
1829 ;; symlinks. We'd rather have the symlinks
1830 ;; for clarity, so remove tgt before linking.
1831 (when (file-exists? tgt) (delete-file tgt))
1832 (symlink "john" tgt)))
1833 (find-files "." symlink?))
1834 (for-each (install-file-to execdir)
1835 (cons* "mailer" "benchmark-unify" "relbench"
1836 (find-files "." ".*\\.js")))
1837 (for-each (lambda (f)
1838 (let* ((base (basename f))
1839 (name (substring base 0 (string-index base #\.)))
1840 (link (string-append bindir "/" name)))
1841 (install-file f execdir)
1842 (when (and (executable-file? f)
1843 (not (file-exists? link)))
1844 (symlink (string-append execdir "/" base) link))))
1845 (find-files "." ".*\\.(pl|py|rb|lua)"))
1846 (for-each (install-file-to datadir)
1847 (append (find-files "." "(stats|dictionary.*)")
1848 (find-files "." "(.*\\.chr|.*\\.lst)")
1849 (find-files "." ".*\\.conf")))
1850 (copy-recursively "rules" (string-append datadir "/rules")))
1851 (copy-recursively "../doc" docdir))))
1852 (delete 'check) ; Tests need installed .conf files; move after install
1853 (add-after 'install 'check
1854 (lambda args
1855 (setenv "HOME" "/tmp") ; Some tests need to write to ~/.john
1856 (setenv "OMP_NUM_THREADS" (number->string (parallel-job-count)))
1857 (apply (assoc-ref %standard-phases 'check) args))))))
1858 (home-page "http://www.openwall.com/john/")
1859 (synopsis "Password cracker")
1860 (description "John the Ripper is a fast password cracker. Its primary
1861purpose is to detect weak Unix passwords. Besides several @code{crypt}
1862password hash types most commonly found on various Unix systems, supported out
1863of the box are Windows LM hashes, plus lots of other hashes and ciphers. This
1864is the community-enhanced, \"jumbo\" version of John the Ripper.")
1865 (license license:gpl2+))))
1866
1867(define-public maskprocessor
1868 (package
1869 (name "maskprocessor")
1870 (version "0.73")
1871 (source
1872 (origin
1873 (method git-fetch)
1874 (uri (git-reference
1875 (url "https://github.com/hashcat/maskprocessor")
1876 (commit (string-append "v" version))))
1877 (file-name (git-file-name name version))
1878 (sha256
1879 (base32 "1vv12iwnkzvjsp9bnix0z1m3hbyhasf5nxngp65b4gdlkk7lqnrd"))))
1880 (build-system gnu-build-system)
1881 (arguments
1882 (list
1883 #:tests? #f ;upstream does not provide tests
1884 #:phases
1885 #~(modify-phases %standard-phases
1886 (delete 'bootstrap)
1887 (delete 'configure)
1888 (replace 'build
1889 (lambda* _args
1890 (invoke "gcc"
1891 "-W"
1892 "-Wall"
1893 "-Werror"
1894 "-std=c99"
1895 "-O2"
1896 "-DLINUX"
1897 "-o"
1898 "maskprocessor"
1899 "src/mp.c")))
1900 (replace 'install
1901 (lambda* _args
1902 (install-file "maskprocessor"
1903 (string-append #$output "/bin")))))))
1904 (home-page "https://github.com/hashcat/maskprocessor")
1905 (synopsis "High-Performance word generator")
1906 (description "Maskprocessor is a high-performance word generator with a
1907per-position configurable charset.")
1908 (license (list license:expat))))
1909
1910(define-public fpm2
1911 (package
1912 (name "fpm2")
1913 (version "0.90.1")
1914 (source
1915 (origin
1916 (method url-fetch)
1917 (uri (string-append "https://als.regnet.cz/fpm2/download/fpm2-"
1918 version ".tar.xz"))
1919 (sha256
1920 (base32
1921 "144mylycnkpzxbbfy30gas450iypgwx0bcd3nrimyws417kwb8qv"))))
1922 (build-system gnu-build-system)
1923 (arguments
1924 (list
1925 #:configure-flags
1926 #~(list "CFLAGS=-O2 -g -fcommon")
1927 #:phases
1928 #~(modify-phases %standard-phases
1929 (add-before 'configure 'pre-configure
1930 ;; The file po/POTFILES.in ends up missing for some reason in
1931 ;; both nix and guix builds. Adding the file with contents
1932 ;; found during troubleshooting.
1933 (lambda _
1934 (call-with-output-file "po/POTFILES.in"
1935 (lambda (port)
1936 (format port "data/fpm2.desktop.in
1937data/fpm2.desktop.in.in
1938src/callbacks.c
1939src/fpm.c
1940src/fpm_file.c
1941src/interface.c
1942src/support.c
1943"))))))))
1944 (inputs
1945 (list gtk+ gnupg libxml2 nettle))
1946 (native-inputs
1947 (list pkg-config intltool))
1948 (synopsis "Manage, generate and store passwords encrypted")
1949 (description "FPM2 is GTK2 port from Figaro's Password Manager
1950originally developed by John Conneely, with some new enhancements.
1951
1952Upstream development seems to have stopped. It is therefore recommended
1953to use a different password manager.")
1954 (home-page "https://als.regnet.cz/fpm2/")
1955 (license license:gpl2+)))
1956
1957(define-public pass-rotate
1958 (package
1959 (name "pass-rotate")
1960 (version "0.1")
1961 (source
1962 (origin
1963 (method git-fetch)
1964 (uri (git-reference
1965 (url "https://git.sr.ht/~sircmpwn/pass-rotate")
1966 (commit version)))
1967 (file-name (git-file-name name version))
1968 (sha256
1969 (base32 "1m067vvdlc85csbpkp8aw4s3ags7q8s3jszrr32kmj9qhk5c254f"))))
1970 (build-system pyproject-build-system)
1971 (arguments (list #:tests? #f)) ; No tests.
1972 (native-inputs (list python-setuptools))
1973 (inputs
1974 (list python-beautifulsoup4 python-docopt python-html5lib
1975 python-requests))
1976 (home-page "https://git.sr.ht/~sircmpwn/pass-rotate")
1977 (synopsis "Rotate password on online services")
1978 (description "pass-rotate is a command line utility and python library for
1979rotating passwords on various web services. It makes it easier to rotate your
1980passwords, one at a time or in bulk, when security events or routine upkeep of
1981your online accounts makes it necessary.")
1982 (license license:expat)))
1983
1984(define-public hashcat
1985 (package
1986 (name "hashcat")
1987 (version "7.1.2")
1988 (source (origin
1989 (method url-fetch)
1990 (uri (string-append "https://hashcat.net/files/hashcat-" version
1991 ".tar.gz"))
1992 (sha256
1993 (base32
1994 "15lbzjfb6n3d06090g1dyf3llc20mnmrn1yc9ys30xbldlracilm"))
1995 (modules '((guix build utils)))
1996 ;; Delete bundled libraries.
1997 (snippet
1998 ;; TODO: Unbundle LZMA-SDK as well
1999 #~(for-each delete-file-recursively
2000 '("deps/unrar" ;; nonfree license
2001 "deps/zlib" "deps/xxHash" "deps/OpenCL-Headers")))))
2002 (inputs (list minizip opencl-headers xxhash zlib))
2003 (build-system gnu-build-system)
2004 (arguments
2005 (list #:tests? #f ;no tests
2006 #:make-flags #~(list (string-append "PREFIX=" #$output)
2007 (string-append "AR=" #$(ar-for-target))
2008 (string-append "CC=" #$(cc-for-target))
2009 (string-append "ENABLE_UNRAR=0")
2010 (string-append "USE_SYSTEM_ZLIB=1")
2011 (string-append "USE_SYSTEM_OPENCL=1")
2012 (string-append "USE_SYSTEM_XXHASH=1"))
2013 #:phases #~(modify-phases %standard-phases
2014 (add-after 'unpack 'fix-reproducibility
2015 (lambda _
2016 (substitute* "src/Makefile"
2017 (("\\$\\(shell date \\+%s\\)")
2018 "0"))))
2019 (delete 'configure))))
2020 (supported-systems %64bit-supported-systems)
2021 (home-page "https://hashcat.net/hashcat/")
2022 (synopsis "Advanced password recovery utility")
2023 (description
2024 "Hashcat is an password recovery utility, supporting five
2025unique modes of attack for over 200 highly-optimized hashing algorithms.
2026Hashcat currently supports CPUs, GPUs, and other hardware accelerators on
2027Linux, Windows, and macOS, and has facilities to help enable distributed
2028password cracking.")
2029 (license license:expat)))
2030
2031(define-public hashcat-utils
2032 (package
2033 (name "hashcat-utils")
2034 (version "1.9")
2035 (source
2036 (origin
2037 (method url-fetch)
2038 (uri (string-append "https://github.com/hashcat/hashcat-utils/releases/"
2039 "download/v" version "/"
2040 "hashcat-utils-" version ".7z"))
2041 (sha256
2042 (base32 "0kq555kb338691qd7zjmi8vhq4km3apnsl2w63zh0igwzcjx6lx1"))))
2043 (native-inputs
2044 (list p7zip))
2045 (inputs
2046 (list perl))
2047 (build-system gnu-build-system)
2048 (arguments
2049 (list
2050 #:tests? #f ;no tests
2051 #:make-flags
2052 #~(list (string-append "CC=" #$(cc-for-target))
2053 ;; Upstream bug(?): "make all" seems to remove the
2054 ;; Perl scripts from the source.
2055 "native")
2056 #:phases
2057 #~(modify-phases %standard-phases
2058 (replace 'unpack
2059 (lambda* (#:key source #:allow-other-keys)
2060 (invoke "7z" "x" source)
2061 (chdir (string-append #$name "-" #$version "/src"))))
2062 (delete 'configure)
2063 (replace 'install
2064 (lambda _
2065 (let ((out (string-append #$output "/bin")))
2066 (mkdir-p out)
2067 (for-each
2068 (lambda (file)
2069 (copy-file file (string-append out "/"
2070 (basename file ".bin"))))
2071 (find-files "." "\\.bin$"))
2072 (for-each
2073 (lambda (file)
2074 (copy-file file (string-append out "/"
2075 (basename file ".pl"))))
2076 (find-files "../bin" "\\.pl$"))))))))
2077 (home-page "https://github.com/hashcat/hashcat-utils/")
2078 (synopsis "Small utilities that are useful in advanced password cracking")
2079 (description "Hashcat-utils are a set of small utilities that are useful
2080in advanced password cracking. They all are packed into multiple stand-alone
2081binaries. All of these utils are designed to execute only one specific
2082function. Since they all work with @code{STDIN} and @code{STDOUT} you can
2083group them into chains.")
2084 (license license:expat)))
2085
2086(define-public zxcvbn-c
2087 (package
2088 (name "zxcvbn-c")
2089 (version "2.6")
2090 (source (origin
2091 (method git-fetch)
2092 (uri (git-reference
2093 (url "https://github.com/tsyrogit/zxcvbn-c")
2094 (commit (string-append "v" version))))
2095 (file-name (git-file-name name version))
2096 (sha256
2097 (base32
2098 "1z8l5qipzqfpg9dg7i7rdhlhswmjk06i14ffrrk3npblrjjya17w"))))
2099 (build-system gnu-build-system)
2100 (arguments
2101 (list #:make-flags
2102 #~(list (string-append "CC=" #$(cc-for-target))
2103 (string-append "CXX=" #$(cxx-for-target)))
2104 #:test-target "test"
2105 #:phases
2106 #~(modify-phases %standard-phases
2107 (delete 'configure)
2108 (replace 'install
2109 (lambda _
2110 (install-file "zxcvbn.h" (string-append #$output "/include"))
2111 (for-each (lambda (file)
2112 (install-file file
2113 (string-append #$output "/lib")))
2114 (find-files "." "libzxcvbn\\.so.*")))))))
2115 (home-page "https://github.com/tsyrogit/zxcvbn-c")
2116 (synopsis "C/C++ implementation of the zxcvbn password strength estimation")
2117 (description "This library is a C/C++ implementation of the zxcvbn password
2118strength estimator. It provides functions to rate password strength, by
2119comparing the password to several word lists, including English first and last
2120names.")
2121 (license license:expat)))
2122
2123(define-public hydra
2124 (package
2125 (name "hydra")
2126 (version "9.7")
2127 (home-page "https://github.com/vanhauser-thc/thc-hydra")
2128 (source
2129 (origin
2130 (method git-fetch)
2131 (uri (git-reference
2132 (url home-page)
2133 (commit (string-append "v" version))))
2134 (file-name (git-file-name name version))
2135 (sha256
2136 (base32
2137 "13l0kfi97mmiizk0j68wyfmwrr9hiz48s4rxc8crjd1zv75lg0z9"))))
2138 (build-system gnu-build-system)
2139 (arguments
2140 (list
2141 #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))
2142 #:tests? #f)) ;no test suite
2143 (native-inputs
2144 (list pkg-config))
2145 (inputs
2146 (list freerdp gtk+ openssl zlib))
2147 (synopsis "Gain access to a remote system by trying logins and passwords")
2148 (description
2149 "This package provides a tool to demonstrate how easy it is to gain
2150unauthorized access to a system by automatically attempting logins and
2151passwords. It supports a wide range of protocols including SSH, SMTP and
2152HTTP.")
2153 (license license:agpl3+)))
2154
2155(define-public bruteforce-luks
2156 (package
2157 (name "bruteforce-luks")
2158 (version "1.4.1")
2159 (source
2160 (origin
2161 (method git-fetch)
2162 (uri (git-reference
2163 (url "https://github.com/glv2/bruteforce-luks")
2164 (commit version)))
2165 (file-name (git-file-name name version))
2166 (sha256
2167 (base32 "1fhvm7ykqv2anny6zavd4iwh6gq5rp1r27p3zhn78sd3y34xhkmp"))))
2168 (build-system gnu-build-system)
2169 (native-inputs
2170 (list autoconf automake))
2171 (inputs
2172 (list cryptsetup-minimal))
2173 (synopsis "LUKS encrypted volume cracker")
2174 (description
2175 "This is a cracker for LUKS encrypted volumes. It can be used either in
2176exhaustive mode to try every password given a charset or in dictionary mode to
2177try every password contained in a file.")
2178 (home-page "https://github.com/glv2/bruteforce-luks")
2179 (license license:gpl3+)))
2180
2181(define-public bruteforce-salted-openssl
2182 (package
2183 (name "bruteforce-salted-openssl")
2184 (version "1.5.0")
2185 (source
2186 (origin
2187 (method git-fetch)
2188 (uri (git-reference
2189 (url "https://github.com/glv2/bruteforce-salted-openssl")
2190 (commit version)))
2191 (file-name (git-file-name name version))
2192 (sha256
2193 (base32 "00w1szj04jb63rh7sq1spc50013jgmz2nwm8k552i9ir8h4phw45"))))
2194 (build-system gnu-build-system)
2195 (native-inputs
2196 (list autoconf automake))
2197 (inputs
2198 (list openssl))
2199 (synopsis "Bruteforce cracker for openssl encrypted files")
2200 (description
2201 "This is a cracker for openssl encrypted files. It can be used either in
2202exhaustive mode to try every password given a charset or in dictionary mode to
2203try every password contained in a file.")
2204 (home-page "https://github.com/glv2/bruteforce-salted-openssl")
2205 (license license:gpl3+)))
2206
2207(define-public makepasswd
2208 (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
2209 (revision "1"))
2210 (package
2211 (name "makepasswd")
2212 (version (git-version "0.5.4" revision commit))
2213 (source
2214 (origin
2215 (method git-fetch)
2216 (uri (git-reference
2217 (url "https://github.com/khorben/makepasswd")
2218 (commit commit)))
2219 (file-name (git-file-name name version))
2220 (sha256
2221 (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
2222 (build-system gnu-build-system)
2223 (native-inputs
2224 (list pkg-config libxslt libxml2 docbook-xsl docbook-xml))
2225 (inputs
2226 (list libxcrypt openssl))
2227 (arguments
2228 (list
2229 #:phases
2230 #~(modify-phases %standard-phases
2231 (delete 'configure))
2232 #:make-flags
2233 #~(list (string-append "CC=" #$(cc-for-target))
2234 (string-append "PREFIX=" #$output))
2235 #:tests? #f)) ;no tests
2236 (synopsis "Generate (pseudo-)random passwords and hashes")
2237 (description
2238 "Makepasswd is a program that generates pseudo-random passwords of a
2239desired length. It can also generate their corresponding hashes for a given
2240encryption algorithm if so desired.")
2241 (home-page "https://github.com/khorben/makepasswd")
2242 (license license:gpl3))))
2243
2244(define-public pass-tomb
2245 ;; Latest release is 4 years old.
2246 (let ((commit "f4f34f4fc1ce7055fac74ad96686be49f7c28c349")
2247 (revision "0"))
2248 (package
2249 (name "pass-tomb")
2250 (version (git-version "1.3" revision commit))
2251 (source
2252 (origin
2253 (method git-fetch)
2254 (uri (git-reference
2255 (url "https://github.com/roddhjav/pass-tomb")
2256 (commit commit)))
2257 (file-name (git-file-name name version))
2258 (sha256
2259 (base32 "0cwik9v5pspyi0kgq6d2kaqy6gj3dgfn97nbjcbkbrbbc7syyd3v"))))
2260 (build-system gnu-build-system)
2261 (arguments
2262 (list
2263 #:make-flags
2264 #~(list (string-append "PREFIX=" #$output)
2265 (string-append "BASHCOMPDIR=" #$output
2266 "/share/bash-completion/completions"))
2267 #:test-target "tests"
2268 ;; tests are very dependent on system state (swap partition) and require
2269 ;; access to /tmp/zsh which is not in the build container.
2270 #:tests? #f
2271 #:phases
2272 #~(modify-phases %standard-phases
2273 (add-after 'unpack 'set-tomb-path
2274 (lambda* (#:key inputs #:allow-other-keys)
2275 (let ((tomb (assoc-ref inputs "tomb")))
2276 (substitute* "tomb.bash"
2277 ((":-tomb")
2278 (string-append ":-" tomb "/bin/tomb"))))))
2279 (delete 'configure))))
2280 (inputs
2281 (list tomb))
2282 (home-page "https://github.com/roddhjav/pass-tomb")
2283 (synopsis "Pass extension keeping the tree of passwords encrypted")
2284 (description "Pass-tomb provides a convenient solution to put your
2285password store in a Tomb and then keep your password tree encrypted when you
2286are not using it. It uses the same GPG key to encrypt passwords and tomb,
2287therefore you don't need to manage more key or secret. Moreover, you can ask
2288pass-tomb to automatically close your store after a given time.")
2289 (license license:gpl3+))))
2290
2291(define-public pass-coffin
2292 (package
2293 (name "pass-coffin")
2294 (version "1.2.1")
2295 (source
2296 (origin
2297 (method git-fetch)
2298 (uri (git-reference
2299 (url "https://github.com/ayushnix/pass-coffin")
2300 (commit (string-append "v" version))))
2301 (file-name (git-file-name name version))
2302 (sha256
2303 (base32 "1486ikwsdjsj74qf949vk47r8mfp2mbbdc3scs8786nnnkhzc89n"))))
2304 (build-system gnu-build-system)
2305 (arguments
2306 (list
2307 #:tests? #f ;No tests
2308 #:make-flags #~(list (string-append "PREFIX="
2309 #$output)
2310 (string-append "BASHCOMPDIR="
2311 #$output "/etc/bash_completion.d"))
2312 #:phases #~(modify-phases %standard-phases
2313 (delete 'configure))))
2314 (inputs (list password-store tar))
2315 (home-page "https://github.com/ayushnix/pass-coffin")
2316 (synopsis "Pass extension to keep the tree of passwords encrypted")
2317 (description
2318 "Pass-coffin is a pass extension that hides the password store
2319data inside a GPG encrypted file, which we'll call a coffin.")
2320 (license license:gpl3)))
2321
2322(define-public xkcdpass
2323 (package
2324 (name "xkcdpass")
2325 (version "1.30.0")
2326 (source
2327 (origin
2328 (method git-fetch)
2329 (uri (git-reference
2330 (url "https://github.com/redacted/XKCD-password-generator")
2331 (commit (string-append "xkcdpass-" version))))
2332 (file-name (git-file-name name version))
2333 (sha256
2334 (base32
2335 "1i2z2bsw7gylg97ls452i92159jq57x9iyjj4j7g46l3z4hmfs8b"))))
2336 (build-system pyproject-build-system)
2337 (arguments
2338 (list
2339 #:test-backend #~'unittest
2340 #:phases
2341 #~(modify-phases %standard-phases
2342 (add-before 'check 'cd-tests
2343 (lambda _
2344 (chdir "tests")))
2345 (add-after 'install 'install-manpage
2346 (lambda _
2347 (install-file
2348 "xkcdpass.1"
2349 (string-append #$output "/share/man/man1")))))))
2350 (native-inputs (list python-setuptools))
2351 (home-page "https://github.com/redacted/XKCD-password-generator")
2352 (synopsis
2353 "Generate secure multiword passwords/passphrases, inspired by XKCD")
2354 (description
2355 "This package provides a flexible and scriptable password generator which
2356generates strong passphrases, inspired by
2357@url{https://xkcd.com/936/,XKCD 936}.")
2358 (license (list license:bsd-3 ;code
2359 license:cc0 ;spanish, eff_large_de, french word lists
2360 license:cc-by-sa3.0 ;finnish, italian word list
2361 license:cc-by-sa4.0 ;norwegian word list
2362 license:eupl1.1 ;finnish word list
2363 license:gpl2 ;portuguese word list
2364 license:gpl3 ;ger-anix word list
2365 license:lgpl2.0 ;finnish word list
2366 license:lgpl2.1 ;portuguese word list
2367 license:mpl1.1)))) ;portuguese word list
2368
2369(define-public himitsu
2370 (package
2371 (name "himitsu")
2372 (version "0.10")
2373 (source (origin
2374 (method git-fetch)
2375 (uri (git-reference
2376 (url "https://git.sr.ht/~sircmpwn/himitsu")
2377 (commit version)))
2378 (file-name (git-file-name name version))
2379 (sha256
2380 (base32
2381 "1753cvfzhr7pppf4w13qbi54bkih70rzdgd63w5ax2kl0v4g8vlq"))))
2382 (build-system hare-build-system)
2383 (native-inputs (list scdoc))
2384 (supported-systems %hare-supported-systems)
2385 (home-page "https://himitsustore.org/")
2386 (synopsis "Password and secret manager daemon")
2387 (description "Himitsu is a daemon-oriented secret storage tool, including
2388both a client and daemon program. Secrets, including passwords and keys, may be
2389requested either through clients such as @code{himitsu-ssh} or through the
2390included @code{hiq} tool. Upon request, the user is prompted to authorize
2391access for that process to that specific secret. Himitsu uses the Hare
2392cryptographic library, which has not been audited.")
2393 (license license:gpl3)))
2394
2395(define-public hiprompt-gtk
2396 (package
2397 (name "hiprompt-gtk")
2398 (version "0.10")
2399 (source (origin
2400 (method git-fetch)
2401 (uri (git-reference
2402 (url "https://git.sr.ht/~sircmpwn/hiprompt-gtk")
2403 (commit version)))
2404 (file-name (git-file-name name version))
2405 (sha256
2406 (base32
2407 "0306nqrix9pfd5zkpf8fs3ih5z7fadm84fa9yzbxbdahx3g8ilv0"))))
2408 (build-system hare-build-system)
2409 (arguments
2410 (list #:tests? #f
2411 #:make-flags #~(list (string-append "CC=" #$(cc-for-target)))))
2412 (inputs (list himitsu hare-gi hare-adwaita hare-gtk4-layer-shell))
2413 (native-inputs (list (list glib "bin") pkg-config))
2414 (supported-systems %hare-supported-systems)
2415 (home-page "https://git.sr.ht/~sircmpwn/hiprompt-gtk")
2416 (synopsis "GTK prompter for Himitsu")
2417 (description "This package provides a GTK prompter for Himitsu, used to
2418request user consent for application access to stored secrets.")
2419 (license license:gpl3)))
2420
2421(define-public himitsu-ssh
2422 (let ((commit "446ff5f0529e1f837381c79d540045e829801d36")
2423 (revision "0"))
2424 (package
2425 (name "himitsu-ssh")
2426 (version (git-version "0.10.0" revision commit))
2427 (source (origin
2428 (method git-fetch)
2429 (uri (git-reference
2430 (url "https://git.sr.ht/~sircmpwn/himitsu-ssh")
2431 (commit commit)))
2432 (file-name (git-file-name name version))
2433 (sha256
2434 (base32
2435 "0q9vd7c5pf8v073isa0y9mpwq1jibg8fkv8cs2jcp4vq1dykamg0"))))
2436 (build-system hare-build-system)
2437 (inputs (list himitsu hare-ssh hare-ev))
2438 (native-inputs (list scdoc))
2439 (supported-systems %hare-supported-systems)
2440 (home-page "https://git.sr.ht/~sircmpwn/himitsu-ssh")
2441 (synopsis "Himitsu ssh-agent")
2442 (description "This package provides an ssh-agent implementation that
2443stores and secures keys through Himitsu.")
2444 (license license:gpl3))))
2445
2446(define-public himitsu-git
2447 (package
2448 (name "himitsu-git")
2449 (version "0.10.0")
2450 (source (origin
2451 (method git-fetch)
2452 (uri (git-reference
2453 (url "https://git.sr.ht/~sircmpwn/himitsu-git")
2454 (commit version)))
2455 (file-name (git-file-name name version))
2456 (sha256
2457 (base32
2458 "1m3n2j1sahks3sn4wb8wxnd1q05fc4acqpylk0fna5i28kn61m47"))))
2459 (build-system hare-build-system)
2460 (arguments (list #:tests? #f)) ; no tests
2461 (inputs (list himitsu))
2462 (native-inputs (list scdoc))
2463 (supported-systems %hare-supported-systems)
2464 (home-page "https://git.sr.ht/~sircmpwn/himitsu-git")
2465 (synopsis "Himitsu git credential helper")
2466 (description "This package provides a git credential helper that queries
2467Himitsu for credentials.")
2468 (license license:gpl3)))
2469
2470(define-public himitsu-secret-service
2471 (package
2472 (name "himitsu-secret-service")
2473 (version "0.1")
2474 (source (origin
2475 (method git-fetch)
2476 (uri (git-reference
2477 (url "https://git.sr.ht/~apreiml/himitsu-secret-service")
2478 (commit version)))
2479 (file-name (git-file-name name version))
2480 (sha256
2481 (base32
2482 "0d77p07l30qshihs5j8wlsi82rfg7y9v83rnjw7qcri7z51irgzg"))))
2483 (build-system pyproject-build-system)
2484 (arguments
2485 (list #:tests? #f
2486 #:phases
2487 #~(modify-phases %standard-phases
2488 (add-after 'build 'build-docs
2489 (lambda _
2490 (invoke "make" "docs")))
2491 (add-after 'install 'install-docs
2492 (lambda _
2493 (install-file "hisecrets-agent.1"
2494 (string-append #$output "/share/man/man1"))
2495 (install-file "himitsu-secret-service.5"
2496 (string-append #$output "/share/man/man5"))
2497 (install-file "himitsu-secret-service.7"
2498 (string-append #$output "/share/man/man7"))))
2499 (add-after 'wrap 'wrap-agent
2500 (lambda _
2501 (let ((bin (string-append #$output "/bin/hisecrets-agent"))
2502 (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
2503 (wrap-program bin
2504 `("GI_TYPELIB_PATH" prefix (,gi-typelib-path))
2505 '("CRYPTO_BACKEND" = ("cryptodome"))))))
2506 (delete 'sanity-check)))) ; we have a slightly too old pygobject
2507 (inputs (cons* python-dbus
2508 python-pycryptodome
2509 python-pygobject
2510 python-pyhimitsu
2511 ;; python-prctl is optional, and is only used on Linux platforms.
2512 (if (target-linux?) `(,python-prctl) '())))
2513 (native-inputs (list python-hatchling python-setuptools scdoc))
2514 (home-page "https://git.sr.ht/~apreiml/himitsu-secret-service")
2515 (synopsis "Freedesktop secret-service daemon implementation for Himitsu")
2516 (description "This package provides a secret service implementation for
2517Himitsu, allowing seamless access for applications storing secrets through the
2518protocol.")
2519 (license license:expat)))
2520
2521(define-public onepass
2522 (package
2523 (name "onepass")
2524 (version "3.3.0")
2525 (source
2526 (origin
2527 (method git-fetch)
2528 (uri (git-reference
2529 (url "https://github.com/mrdomino/onepass")
2530 (commit (string-append "v" version))))
2531 (file-name (git-file-name name version))
2532 (sha256
2533 (base32 "1nsfl2sdb42a8r4pdazpq0pskkrm7wk5yg7zi1jhwr9iigjwhqrb"))
2534 ;; The macro std::assert_matches! is unstable in Rust 1.95.
2535 (modules '((guix build utils)))
2536 (snippet
2537 #~(substitute* "src/seed_password/keyring/mod.rs"
2538 (("use std::assert_matches;")
2539 "")
2540 (("assert_matches!\\((.*)\\);" _ value+pattern)
2541 (string-append "assert!(matches!(" value+pattern "));"))))))
2542 (build-system cargo-build-system)
2543 (arguments
2544 (list
2545 #:rust rust-1.95
2546 #:install-source? #f
2547 #:cargo-install-paths ''(".")
2548 #:cargo-test-flags
2549 ;; The test needs a session bus of D-Bus.
2550 ''("--" "--skip=seed_password::keyring::tests::get_entry_succeeds")))
2551 (native-inputs (list pkg-config))
2552 (inputs (cons* dbus openssl (cargo-inputs 'onepass)))
2553 (home-page "https://github.com/mrdomino/onepass")
2554 (synopsis "Mostly stateless deterministic password manager")
2555 (description
2556 "This is a command to compute passwords, by a one-way function, from
2557Uniform Resource Identifiers of the services and one secret seed password, and
2558maybe user names, increments or schemata for the outputs, like
2559@code{[[:alnum:]]@{29@}$}. It can read the seed at a prompt, from a keyring
2560or from standard input.")
2561 (license license:agpl3)))