From cfa642c755f5fcda4aa1b33ec0e66aab11fe647f Mon Sep 17 00:00:00 2001 From: XYenon Date: Wed, 29 Jun 2022 13:42:49 +0800 Subject: [PATCH] go-graft: init at 0.2.6 --- .../networking/go-graft/default.nix | 28 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/applications/networking/go-graft/default.nix diff --git a/pkgs/applications/networking/go-graft/default.nix b/pkgs/applications/networking/go-graft/default.nix new file mode 100644 index 000000000000..f919ff757fc9 --- /dev/null +++ b/pkgs/applications/networking/go-graft/default.nix @@ -0,0 +1,28 @@ +{ lib, fetchFromGitHub, buildGoModule }: + +buildGoModule rec { + pname = "go-graft"; + version = "0.2.6"; + + src = fetchFromGitHub { + owner = "mzz2017"; + repo = "gg"; + rev = "v${version}"; + sha256 = "sha256-nuRkQEqytMPxd2Wh5XeUwk4YzIxnnNEiVTxFY4GlD1E="; + }; + + CGO_ENABLED = 0; + + ldflags = [ "-X github.com/mzz2017/gg/cmd.Version=${version}" "-s" "-w" "-buildid=" ]; + vendorSha256 = "sha256-/ckudHo/ttNct+yrQYQEaC6hX+p+Q6M1I/cjJCgjYLk="; + subPackages = [ "." ]; + + meta = with lib; { + description = "A command-line tool for one-click proxy in your research and development without installing v2ray or anything else"; + homepage = "https://github.com/mzz2017/gg"; + license = licenses.agpl3Plus; + maintainers = with maintainers; [ xyenon ]; + mainProgram = "gg"; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25bac6e56b2c..ecdf268a4a17 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -27249,6 +27249,10 @@ with pkgs; google-chrome-dev = google-chrome.override { chromium = chromiumDev; channel = "dev"; }; + go-graft = callPackage ../applications/networking/go-graft { + buildGoModule = buildGo118Module; + }; + gosmore = callPackage ../applications/misc/gosmore { stdenv = gcc10StdenvCompat; }; gpsbabel = libsForQt5.callPackage ../applications/misc/gpsbabel { };