diff mbox series

[bug#41032] Add makepasswd package

Message ID 87zhamw75k.fsf@m4x.org
State Accepted
Headers show
Series [bug#41032] Add makepasswd package | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job

Commit Message

Jean-Baptiste Note May 5, 2020, 6:47 p.m. UTC
Hi Marius,

Thanks for your review and the heads up on the correct file.
Please find an updated patch.

I've used guix-devel-mode and ran indent-according-to-mode on the buffer
before producing the patch; let me know if this is not sufficient to
correctly indent the code :)

Kind regards,
Jean-Baptiste

Comments

Marius Bakke May 6, 2020, 8:29 p.m. UTC | #1
Jean-Baptiste Note <jean-baptiste.note@m4x.org> writes:

> Hi Marius,
>
> Thanks for your review and the heads up on the correct file.
> Please find an updated patch.
>
> I've used guix-devel-mode and ran indent-according-to-mode on the buffer
> before producing the patch; let me know if this is not sufficient to
> correctly indent the code :)

Thanks!  My Emacs agrees, so LGTM.

[...]

> +      (arguments
> +       `(#:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure))
> +         #:make-flags (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))

I moved the second flag to its own line as 89 characters is a bit much.

> +         #:tests? #f))

And added a comment about why tests are disabled.

> +      (synopsis "Generate (pseudo-)random passwords and hashes")
> +      (description
> +       "Makepasswd is a program that generates pseudo-random passwords of a
> +desired length.  It can also generate their corresponding hashes for a given
> +encryption algorithm if so desired.")
> +      (home-page "https://github.com/khorben/makepasswd")
> +      (license license:gpl3))))

Indeed GPL3 only :-/

Applied!
diff mbox series

Patch

From 3d8786e2b818e28e79fc62eb6872bea1400a1d24 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Note <jean-baptiste.note@m4x.org>
Date: Sat, 2 May 2020 05:50:20 +0000
Subject: [PATCH] gnu: Add makepasswd.

* gnu/packages/password-utils.scm (makepasswd): New variable.
---
 gnu/packages/password-utils.scm | 39 +++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
index 2a570691a4..59c7befddc 100644
--- a/gnu/packages/password-utils.scm
+++ b/gnu/packages/password-utils.scm
@@ -61,6 +61,7 @@ 
   #:use-module (gnu packages crypto)
   #:use-module (gnu packages cryptsetup)
   #:use-module (gnu packages curl)
+  #:use-module (gnu packages docbook)
   #:use-module (gnu packages file)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gettext)
@@ -1168,3 +1169,41 @@  exhaustive mode to try every password given a charset or in dictionary mode to
 try every password contained in a file.")
     (home-page "https://github.com/glv2/bruteforce-luks")
     (license license:gpl3+)))
+
+(define-public makepasswd
+  (let ((commit "3545d57d3a589a392d7eb0df36a5286785345c9e")
+        (revision "1"))
+    (package
+      (name "makepasswd")
+      (version (git-version "0.5.4" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/khorben/makepasswd")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0lspqyyxbk6h28yxnp7pd5aib161vrkzgasam5jpzn35n1jacx2j"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("pkg-config" ,pkg-config)
+         ("libxslt" ,libxslt)
+         ("libxml2" ,libxml2)
+         ("docbook-xsl" ,docbook-xsl)
+         ("docbook-xml" ,docbook-xml)))
+      (inputs
+       `(("openssl" ,openssl)))
+      (arguments
+       `(#:phases
+         (modify-phases %standard-phases
+           (delete 'configure))
+         #:make-flags (list "CC=gcc" (string-append "PREFIX=" (assoc-ref %outputs "out")))
+         #:tests? #f))
+      (synopsis "Generate (pseudo-)random passwords and hashes")
+      (description
+       "Makepasswd is a program that generates pseudo-random passwords of a
+desired length.  It can also generate their corresponding hashes for a given
+encryption algorithm if so desired.")
+      (home-page "https://github.com/khorben/makepasswd")
+      (license license:gpl3))))
-- 
2.26.2