From patchwork Sun Feb 11 18:28:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexey Abramov X-Patchwork-Id: 60089 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 AAA9F27BBE2; Sun, 11 Feb 2024 18:30:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 0B40E27BBE9 for ; Sun, 11 Feb 2024 18:30:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZEaQ-0005rZ-5F; Sun, 11 Feb 2024 13:29:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZEaL-0005pM-Q1 for guix-patches@gnu.org; Sun, 11 Feb 2024 13:29:50 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZEaL-0008FK-HV for guix-patches@gnu.org; Sun, 11 Feb 2024 13:29:49 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZEab-0003YG-Q1 for guix-patches@gnu.org; Sun, 11 Feb 2024 13:30:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54335] [PATCH v4 10/12] gnu: Add nebula. Resent-From: Alexey Abramov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Feb 2024 18:30:05 +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 Received: via spool by 54335-submit@debbugs.gnu.org id=B54335.170767615513447 (code B ref 54335); Sun, 11 Feb 2024 18:30:05 +0000 Received: (at 54335) by debbugs.gnu.org; 11 Feb 2024 18:29:15 +0000 Received: from localhost ([127.0.0.1]:37998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZEZn-0003Un-6e for submit@debbugs.gnu.org; Sun, 11 Feb 2024 13:29:15 -0500 Received: from mail.mmer.org ([178.22.65.174]:48234) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZEZd-0003Rm-Ev for 54335@debbugs.gnu.org; Sun, 11 Feb 2024 13:29:07 -0500 Received: from mail.mmer.org (localhost [127.0.0.1]) by mail.mmer.org (OpenSMTPD) with ESMTP id b31b3f4c for <54335@debbugs.gnu.org>; Sun, 11 Feb 2024 18:28:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=mmer.org; h=from:to :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=+0yzMKEY8uuo fvWi5deRkj1VORLP++A+OC/Dk5q3wfs=; b=sgc/BayAH+124HPxnBo1RRVkco1o +HQfzsGUmBPKk7cVNoX0AJU5lypFWaUUvvwUee5xmHPdC31RZCx/1oE+MVS+FbrF VxKlC8Psc1YIv0xbOT8wY29nLMM/9p8OJ8tyqM7iOgO6nnpZHo75MmhH3oVyNznZ eifPYs0+fMIm6ho= Received: from delta (i60212.upc-i.chello.nl [62.195.60.212]) by mail.mmer.org (OpenSMTPD) with ESMTPSA id 9ec0956a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for <54335@debbugs.gnu.org>; Sun, 11 Feb 2024 18:28:37 +0000 (UTC) Date: Sun, 11 Feb 2024 19:28:24 +0100 Message-ID: <20240211182830.3631-11-levenson@mmer.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240211182830.3631-1-levenson@mmer.org> References: <20240211182830.3631-1-levenson@mmer.org> MIME-Version: 1.0 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: , Reply-to: Alexey Abramov X-ACL-Warn: , Alexey Abramov via Guix-patches X-Patchwork-Original-From: Alexey Abramov via Guix-patches via From: Alexey Abramov Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Dominic Martinez * gnu/packages/networking.scm (nebula): New variable. Co-authored-by: Alexey Abramov --- gnu/packages/networking.scm | 84 +++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index ca826bf864..0addb3cedd 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -62,6 +62,8 @@ ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2023 Artyom V. Poptsov ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz> +;;; Copyright © 2022 Dominic Martinez +;;; Copyright © 2024 Alexey Abramov ;;; ;;; This file is part of GNU Guix. ;;; @@ -125,6 +127,8 @@ (define-module (gnu packages networking) #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) + #:use-module (gnu packages golang-check) + #:use-module (gnu packages golang-crypto) #:use-module (gnu packages golang-web) #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) @@ -164,6 +168,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 telephony) @@ -4837,6 +4842,7 @@ (define-public putty (home-page "https://www.chiark.greenend.org.uk/~sgtatham/putty/") (license license:expat))) + (define-public vnstat (package (name "vnstat") @@ -4935,3 +4941,81 @@ (define-public dropwatch recording packets that are dropped by the kernel. It provides the commands @command{dropwatch} and @command{dwdump}.") (license license:gpl2+))) + +(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)))