From: "Jakub Kądziołka" <kuba@kadziolka.net>
To: 39021@debbugs.gnu.org
Subject: [bug#39021] [PATCH] Add Keybase
Date: Tue, 7 Jan 2020 21:00:39 +0100 [thread overview]
Message-ID: <20200107200039.jga75muq7excgpqu@zdrowyportier.kadziolka.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 730 bytes --]
Hi Guix,
please find attached a set of patches that adds the non-GUI parts of
Keybase (the GUI is an Electron application - as far as I am aware,
there are no similar packages in Guix, so packaging the GUI requires a
significant amount of further work).
Unresolved question: in other distributions, the package provides user
units for systemd. Should the Guix package provide Shepherd services to
be ran as the user? If so, are there any other examples I could look at
and draw inspiration from? Also, I haven't been able to find any
documentation on how to set up user shepherd, apart from a passing
mention of that being possible in the documentation. I would appreciate
any pointers on the topic.
Regards,
Jakub Kądziołka
[-- Attachment #2: 0001-build-system-go-Allow-providing-additional-build-fla.patch --]
[-- Type: text/x-diff, Size: 3026 bytes --]
From 0d744787c48c7184a70dda9fc1bb2c0d334fc080 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= <kuba@kadziolka.net>
Date: Sun, 5 Jan 2020 17:13:20 +0100
Subject: [PATCH 1/2] build-system/go: Allow providing additional build flags
* guix/build-system/go.scm (build-flags): New argument.
* guix/build/go-build-system.scm (build): Use apply to pass the
additional arguments to invoke.
---
guix/build-system/go.scm | 3 +++
guix/build/go-build-system.scm | 7 ++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 1b916af8f9..86f57079b1 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Petter <petter@mykolab.ch>
;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -82,6 +83,7 @@
(install-source? #t)
(import-path "")
(unpack-path "")
+ (build-flags '())
(tests? #t)
(allow-go-reference? #f)
(system (%current-system))
@@ -109,6 +111,7 @@
#:install-source? ,install-source?
#:import-path ,import-path
#:unpack-path ,unpack-path
+ #:build-flags ,build-flags
#:tests? ,tests?
#:allow-go-reference? ,allow-go-reference?
#:inputs %build-inputs)))
diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index 4bc0156a88..49887848f6 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2016 Petter <petter@mykolab.ch>
;;; Copyright © 2017, 2019 Leo Famulari <leo@famulari.name>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -209,18 +210,18 @@ unpacking."
(_ #f))
inputs))))
-(define* (build #:key import-path #:allow-other-keys)
+(define* (build #:key import-path build-flags #:allow-other-keys)
"Build the package named by IMPORT-PATH."
(with-throw-handler
#t
(lambda _
- (invoke "go" "install"
+ (apply invoke "go" "install"
"-v" ; print the name of packages as they are compiled
"-x" ; print each command as it is invoked
;; Respectively, strip the symbol table and debug
;; information, and the DWARF symbol table.
"-ldflags=-s -w"
- import-path))
+ `(,@build-flags ,import-path)))
(lambda (key . args)
(display (string-append "Building '" import-path "' failed.\n"
"Here are the results of `go env`:\n"))
--
2.24.1
[-- Attachment #3: 0002-gnu-Add-keybase.patch --]
[-- Type: text/x-diff, Size: 3239 bytes --]
From 3de233a2d8e6bdb4723844337b69b6612616c9c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= <kuba@kadziolka.net>
Date: Tue, 7 Jan 2020 20:29:21 +0100
Subject: [PATCH 2/2] gnu: Add keybase.
* gnu/packages/crypto.scm
(keybase-component): New function.
(keybase, git-remote-keybase, kbfs): New variables.
---
gnu/packages/crypto.scm | 49 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index dd49c12e5b..c78515ae68 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2018 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
;;; Copyright © 2019 Pierre Neidhardt <mail@ambrevar.xyz>
;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -69,6 +70,7 @@
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system go)
#:use-module (guix build-system perl)
#:use-module (guix build utils)
#:use-module (srfi srfi-1)
@@ -1040,3 +1042,50 @@ minisign uses a slightly different format to store secret keys. Minisign
signatures include trusted comments in addition to untrusted comments.
Trusted comments are signed, thus verified, before being displayed.")
(license license:isc)))
+
+(define* (keybase-component #:key name repo-path synopsis description)
+ (package
+ (name name)
+ (version "5.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://github.com/keybase/client/releases/download/v"
+ version "/keybase-v" version ".tar.xz"))
+ (sha256
+ (base32
+ "1i6waaprdr89k3lrg36hn11f5z8j0n2iv6gpyrynbh2h128cfpwy"))))
+ (build-system go-build-system)
+ (arguments
+ `(#:import-path ,(string-append "github.com/keybase/client/go/" repo-path)
+ #:unpack-path "github.com/keybase/client"
+ #:build-flags '("-tags" "production")
+ #:install-source? #f))
+ (home-page "https://keybase.io")
+ (synopsis synopsis)
+ (description description)
+ (license license:bsd-3)))
+
+(define-public keybase
+ (keybase-component
+ #:name "keybase"
+ #:repo-path "keybase"
+ #:synopsis "Command-line client for Keybase"
+ #:description "Keybase is a key directory that maps social media identities
+to encryption keys in a publically auditable manner. End-to-end encrypted chat,
+cloud storage and git hosting is also provided."))
+
+(define-public git-remote-keybase
+ (keybase-component
+ #:name "git-remote-keybase"
+ #:repo-path "kbfs/kbfsgit/git-remote-keybase"
+ #:synopsis "Git remote helper for Keybase encrypted repositories"
+ #:description "keybase-kbfsgit provides the git remote helper that handles
+@code{keybase://} URIs."))
+
+(define-public kbfs
+ (keybase-component
+ #:name "kbfs"
+ #:repo-path "kbfs/kbfsfuse"
+ #:synopsis "FUSE handler for the Keybase filesystem"
+ #:description "Handles mounting /keybase"))
--
2.24.1
next reply other threads:[~2020-01-07 20:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 20:00 Jakub Kądziołka [this message]
2020-01-24 18:34 ` [bug#39021] go package rebuilds Jakub Kądziołka
2020-01-28 21:54 ` [bug#39021] [PATCH 1/2 v2] build-system/go: Allow providing additional build flags Jakub Kądziołka
2020-02-08 0:20 ` [bug#39021] [PATCH] Add Keybase Leo Famulari
2020-02-11 16:36 ` Jakub Kądziołka
2020-02-11 17:36 ` Leo Famulari
2020-05-31 7:09 ` Efraim Flashner
2020-05-31 21:47 ` 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=20200107200039.jga75muq7excgpqu@zdrowyportier.kadziolka.net \
--to=kuba@kadziolka.net \
--cc=39021@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).