From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 07 15:01:03 2020 Received: (at submit) by debbugs.gnu.org; 7 Jan 2020 20:01:03 +0000 Received: from localhost ([127.0.0.1]:49411 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iov28-00046d-G7 for submit@debbugs.gnu.org; Tue, 07 Jan 2020 15:01:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:56712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iov25-00046V-To for submit@debbugs.gnu.org; Tue, 07 Jan 2020 15:00:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58781) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iov23-0001Hr-Uf for guix-patches@gnu.org; Tue, 07 Jan 2020 15:00:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iov22-0000mD-1Q for guix-patches@gnu.org; Tue, 07 Jan 2020 15:00:51 -0500 Received: from pat.zlotemysli.pl ([37.59.186.212]:59878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iov21-0000dT-L9 for guix-patches@gnu.org; Tue, 07 Jan 2020 15:00:49 -0500 Received: (qmail 15452 invoked by uid 1009); 7 Jan 2020 21:00:41 +0100 Received: from 188.123.215.55 (kuba@kadziolka.net@188.123.215.55) by pat (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25686. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(188.123.215.55):. Processed in 0.059646 secs); 07 Jan 2020 20:00:41 -0000 Received: from unknown (HELO zdrowyportier.kadziolka.net) (kuba@kadziolka.net@188.123.215.55) by pat.zlotemysli.pl with SMTP; 7 Jan 2020 21:00:41 +0100 Date: Tue, 7 Jan 2020 21:00:39 +0100 From: Jakub =?utf-8?B?S8SFZHppb8WCa2E=?= To: guix-patches@gnu.org Subject: [PATCH] Add Keybase Message-ID: <20200107200039.jga75muq7excgpqu@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="u552dxktsdzvxzzr" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 37.59.186.212 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --u552dxktsdzvxzzr Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 --u552dxktsdzvxzzr Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-build-system-go-Allow-providing-additional-build-fla.patch" Content-Transfer-Encoding: 8bit From 0d744787c48c7184a70dda9fc1bb2c0d334fc080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= 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 ;;; Copyright © 2017 Leo Famulari +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; 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 ;;; Copyright © 2017, 2019 Leo Famulari ;;; Copyright © 2019 Maxim Cournoyer +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; 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 --u552dxktsdzvxzzr Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0002-gnu-Add-keybase.patch" Content-Transfer-Encoding: 8bit From 3de233a2d8e6bdb4723844337b69b6612616c9c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20K=C4=85dzio=C5=82ka?= 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 ;;; Copyright © 2019 Pierre Neidhardt ;;; Copyright © 2019 Tanguy Le Carrour +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; 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 --u552dxktsdzvxzzr--