From patchwork Mon Apr 4 19:32:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dominic Martinez X-Patchwork-Id: 38320 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0B84B27BBEA; Mon, 4 Apr 2022 20:34:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3630F27BBE9 for ; Mon, 4 Apr 2022 20:34:14 +0100 (BST) Received: from localhost ([::1]:40782 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbSSr-0002Me-CH for patchwork@mira.cbaines.net; Mon, 04 Apr 2022 15:34:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbSSi-0002I1-CA for guix-patches@gnu.org; Mon, 04 Apr 2022 15:34:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59177) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbSSi-0002Ro-3h for guix-patches@gnu.org; Mon, 04 Apr 2022 15:34:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nbSSi-00049S-16 for guix-patches@gnu.org; Mon, 04 Apr 2022 15:34:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54335] [PATCH v3 10/10] gnu: Add nebula. Resent-From: Dominic Martinez Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Apr 2022 19:34:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54335 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54335@debbugs.gnu.org Cc: Dominic Martinez Received: via spool by 54335-submit@debbugs.gnu.org id=B54335.164910079915827 (code B ref 54335); Mon, 04 Apr 2022 19:34:03 +0000 Received: (at 54335) by debbugs.gnu.org; 4 Apr 2022 19:33:19 +0000 Received: from localhost ([127.0.0.1]:53070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbSRv-000478-Lt for submit@debbugs.gnu.org; Mon, 04 Apr 2022 15:33:18 -0400 Received: from mta-06-4.privateemail.com ([198.54.122.146]:37457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbSRt-00046I-E0 for 54335@debbugs.gnu.org; Mon, 04 Apr 2022 15:33:14 -0400 Received: from mta-06.privateemail.com (localhost [127.0.0.1]) by mta-06.privateemail.com (Postfix) with ESMTP id 0A36718000AF; Mon, 4 Apr 2022 15:33:08 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dominicm.dev; s=default; t=1649100788; bh=8ikobKu3zlaDLtoJoxXR83o1RJlauThtznTed5UL0ro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X7M1rnneyI4ncmlU5x78TmwSrIEZA0S4rLmFZV2MghF9AuoyGduOw0vio/Yh4ZQlf N5zUXRsEL5i1sa/y6u1vv1/bkQO+JBd+y8j7JBXbQ/9TMVD9ub+Cv6tEONv9rRp8/F 6H+6jRIthOFRDhpVHK/c3o3YazFzgG+XZLNs/Ruk5UK270WJm6+XwennXzsBrWEbLh nYWgwnSJVBh9Q8AiQSLJUGfi9uUKPEFzCYlkU7v0+LQ0f0xzpvRC1UmzCVlVmlBbks rmo5yQHP+6ZvWSm/QIwwzC1kGkiuw4Zn7cWIWdgAmoYSCStfqhJY102Fr3K5VM/m1T ihCZbOuXnuvnQ== Received: from guix.wireless.duke.edu (unknown [10.20.151.184]) by mta-06.privateemail.com (Postfix) with ESMTPA id 7404918000A8; Mon, 4 Apr 2022 15:33:05 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dominicm.dev; s=default; t=1649100787; bh=8ikobKu3zlaDLtoJoxXR83o1RJlauThtznTed5UL0ro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mIEDbeQX0KYjHcfPUtOO7msOZJa4rfymuv3eKEUemQqhQa2oa4j1apCcGBmCgyGIC dScnbIK3n/9i3BZBbWTwLic4I0HTZcExFJuhrYIYBbQ0UPUj7YWgaB4z7/Im5n2mDA XIKkdAiMtsjeJ6VnIf83x1b1LFOHcqzMfSupRLWwmfcWpd4BhqJacWuGSTjbDrfvQ6 2PuPAwaLRDm9ILfGtH3ONtGruyLmIb8bgetpfk6QXbSrRGiHvmxO1KNnCL+oP1t3yY 8DfkfExpNs9SuF9LYepO+n246UgW+ASCnSnATrXuX3IQe4Oli/egkeeJ9GQWbNimsS FnABfZAPQTVRQ== From: Dominic Martinez Date: Mon, 4 Apr 2022 15:32:08 -0400 Message-Id: <20220404193208.27634-11-dom@dominicm.dev> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220404193208.27634-1-dom@dominicm.dev> References: <20220404193208.27634-1-dom@dominicm.dev> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/networking.scm (nebula): New variable. --- I tried to modify the description to more accurately describe the difference between Nebula and other, distributed overlay networks currently on Guix like yggdrasil and gnunet, but I'm not sure I did a good job. I also wasn't sure whether to remove the blobs in a phase or source snippet, since existing packages seem to do both. I opted for the snippet so that the blobs would never touch the source definition. gnu/packages/networking.scm | 80 +++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index b45f2f79f2..51285df685 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -48,6 +48,7 @@ ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2022 Simon South +;;; Copyright © 2022 Dominic Martinez ;;; ;;; This file is part of GNU Guix. ;;; @@ -140,6 +141,7 @@ (define-module (gnu packages networking) #:use-module (gnu packages shells) #:use-module (gnu packages sphinx) #:use-module (gnu packages sqlite) + #:use-module (gnu packages syncthing) #:use-module (gnu packages ssh) #:use-module (gnu packages tcl) #:use-module (gnu packages textutils) @@ -4191,3 +4193,81 @@ (define-public putty implementations.") (home-page "https://www.chiark.greenend.org.uk/~sgtatham/putty/") (license license:expat))) + +(define-public nebula + (package + (name "nebula") + (version "1.5.2") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/slackhq/nebula") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "14b7wgx83w1fhcbhsn0mfg872hkml4wwbzimb3bjvc3xpzx6w44k")) + ;; Remove windows-related binary blobs and files + (snippet + #~(begin + (use-modules (guix build utils)) + (delete-file-recursively "dist/windows") + (delete-file-recursively "wintun"))))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/slackhq/nebula" + #:install-source? #f + #:phases + (modify-phases %standard-phases + (replace 'build + (lambda _ + ;; Build nebula and nebula-cert + (let* ((dir "github.com/slackhq/nebula") + (nebula-cmd (string-append dir "/cmd/nebula")) + (cert-cmd (string-append dir "/cmd/nebula-cert"))) + (invoke "go" "build" nebula-cmd) + (invoke "go" "build" cert-cmd)))) + + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bindir (string-append out "/bin"))) + (install-file "nebula" bindir) + (install-file "nebula-cert" bindir))))))) + (inputs + (list go-golang-org-x-term + go-gopkg-in-yaml-v2 + go-google-golang-org-protobuf + go-golang-org-x-sys + go-golang-org-x-net + go-golang-org-x-crypto + go-netns + go-netlink + go-github-com-skip2-go-qrcode + go-github-com-stretchr-testify + go-github-com-songgao-water + go-github-com-sirupsen-logrus + go-github-com-rcrowley-go-metrics + go-github-com-prometheus-procfs + go-github-com-prometheus-client-model + go-github-com-prometheus-client-golang + go-github-com-nbrownus-go-metrics-prometheus + go-github-com-miekg-dns + go-github-com-imdario-mergo + go-github-com-google-gopacket + go-github-com-gogo-protobuf + go-github-com-flynn-noise + go-github-com-cyberdelia-go-metrics-graphite + go-github-com-cespare-xxhash + go-github-com-armon-go-radix + go-github-com-anmitsu-go-shlex)) + (home-page "https://github.com/slackhq/nebula") + (synopsis "Scalable, peer-to-peer overlay networking tool") + (description + "Nebula is a peer-to-peer networking tool based on the +@url{https://noiseprotocol.org/, Noise Protocol Framework}. It is not a fully +decentralized network, but instead uses central discovery nodes and a +certificate authority to facilitate direct, encrypted peer-to-peer connections +from behind most firewalls and @acronym{NAT, Network Address Translation} +layers.") + (license license:expat)))