unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: 41637@debbugs.gnu.org
Subject: [bug#41637] [PATCH] gnu: Add hashcash.
Date: Mon,  1 Jun 2020 02:40:15 +0200	[thread overview]
Message-ID: <20200601004015.21684-1-kuba@kadziolka.net> (raw)

* gnu/packages/networking.scm (hashcash): New variable.
---

Is the license field here alright? Here's what the LICENSE file has to
say:

> This software can be distributed and used under any of the following
> licenses:
> 
> 	CPL
> 	public domain
> 	BSD (3 clause -- no advertising clause)
> 	LGPL (2.1)
> 	GPL (2)
> 
> in rough order of author preference.
> 
> The CPL is probably unique to this package, and is described here:
> http://www.cypherspace.org/CPL/; if you can't be bothered to figure it
> out feel free to use one of the other licenses.  Earlier versions
> where distributed just under CPL.  CPL allows you to re-license under
> a license of your choice, I just include other specific licenses to
> save people having to read, understand and feel confident in the
> validity of the CPL.
> 
> NOTE: on systems without a POSIX getopt this package will be linked
> with the included getopt.c which is distributed under GPL 2.

 gnu/packages/networking.scm | 46 +++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index fd29370841..169aa4ed8e 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -38,6 +38,7 @@
 ;;; Copyright © 2019 Diego N. Barbato <dnbarbato@posteo.de>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -3189,3 +3190,48 @@ CDP.  The goal of LLDP is to provide an inter-vendor compatible mechanism to
 deliver Link-Layer notifications to adjacent network devices.  @code{lldpd} is
 an implementation of LLDP.  It also supports some proprietary protocols.")
     (license license:isc)))
+
+(define-public hashcash
+  (package
+    (name "hashcash")
+    (version "1.22")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.hashcash.org/source/hashcash-"
+                           version ".tgz"))
+       (sha256
+        (base32
+         "15kqaimwb2y8wvzpn73021bvay9mz1gqqfc40gk4hj6f84nz34h1"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags '("CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         ;; No tests available.
+         (delete 'check)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((outdir (assoc-ref outputs "out"))
+                    (bindir (string-append outdir "/bin"))
+                    (mandir (string-append outdir "/share/man/man1"))
+                    (docdir (string-append outdir "/share/doc/hashcash-" ,version)))
+               ;; make install assumes /usr and doesn't provide a way to override it
+               (install-file "hashcash" bindir)
+               (install-file "hashcash.1" mandir)
+               (install-file "README" docdir)
+               (install-file "LICENSE" docdir)
+               (install-file "CHANGELOG" docdir)
+               #t))))))
+    (home-page "https://www.hashcash.org/")
+    (synopsis "Denial-of-service countermeasure")
+    (description "Hashcash is a proof-of-work algorithm, which has been used
+as a denial-of-service countermeasure technique in a number of systems.
+
+A hashcash stamp constitutes a proof-of-work which takes a parametrizable
+amount of work to compute for the sender.  The recipient can verify received
+hashcash stamps efficiently.
+
+This package contains a command-line tool for computing and verifying hashcash
+stamps.")
+    (license license:public-domain)))
-- 
2.26.2





             reply	other threads:[~2020-06-01  0:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-01  0:40 Jakub Kądziołka [this message]
2020-06-02 12:12 ` [bug#41637] [PATCH] gnu: Add hashcash Mathieu Othacehe
2020-06-02 13:25   ` Jakub Kądziołka
2020-06-03  6:55 ` Mathieu Othacehe
2020-06-03 12:18   ` Jakub Kądziołka
2020-06-03 12:30     ` Mathieu Othacehe
2020-06-06 14:39   ` Jakub Kądziołka
2020-06-20 21:29 ` bug#41637: Done: " Jakub Kądziołka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200601004015.21684-1-kuba@kadziolka.net \
    --to=kuba@kadziolka.net \
    --cc=41637@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).