From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59309) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iov3D-0001cl-MV for guix-patches@gnu.org; Tue, 07 Jan 2020 15:02:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iov3C-0001vW-15 for guix-patches@gnu.org; Tue, 07 Jan 2020 15:02:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43438) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iov3B-0001vG-T6 for guix-patches@gnu.org; Tue, 07 Jan 2020 15:02:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iov3B-00048S-Oi for guix-patches@gnu.org; Tue, 07 Jan 2020 15:02:01 -0500 Subject: [bug#39021] [PATCH] Add Keybase Resent-Message-ID: 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 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 Date: Tue, 7 Jan 2020 21:00:39 +0100 From: Jakub =?UTF-8?Q?K=C4=85dzio=C5=82ka?= Message-ID: <20200107200039.jga75muq7excgpqu@zdrowyportier.kadziolka.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="u552dxktsdzvxzzr" Content-Disposition: inline Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 39021@debbugs.gnu.org --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--