aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/tools/gosec
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/tools/gosec')
-rw-r--r--nixpkgs/pkgs/development/tools/gosec/default.nix33
-rw-r--r--nixpkgs/pkgs/development/tools/gosec/deps.nix193
2 files changed, 17 insertions, 209 deletions
diff --git a/nixpkgs/pkgs/development/tools/gosec/default.nix b/nixpkgs/pkgs/development/tools/gosec/default.nix
index 2600d13cab9..ffbd98a4577 100644
--- a/nixpkgs/pkgs/development/tools/gosec/default.nix
+++ b/nixpkgs/pkgs/development/tools/gosec/default.nix
@@ -1,29 +1,30 @@
-{ buildGoPackage
-, lib
-, fetchFromGitHub
-}:
+{ stdenv, buildGoModule, fetchFromGitHub }:
-buildGoPackage rec {
+buildGoModule rec {
pname = "gosec";
- version = "1.2.0";
+ version = "2.4.0";
- goPackagePath = "github.com/securego/gosec";
- excludedPackages = ''cmd/tlsconfig'';
+ subPackages = [ "cmd/gosec" ];
src = fetchFromGitHub {
owner = "securego";
- repo = "gosec";
- rev = version;
- sha256 = "1420yl4cjp4v4xv0l0wbahgl6bjhz77lx5va9hqa6abddmqvx1hg";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "0mqijzr3vj4wycykqpjz9xw9fhpbnzz988z2q3nldb5ax0pyrxca";
};
- goDeps = ./deps.nix;
+ vendorSha256 = "063dpq1k5lykp18gshlgg098yvppicv3cz8gjn1mvfhac2rl9yqr";
- meta = with lib; {
- description = "Golang security checker";
+ doCheck = false;
+
+ buildFlagsArray = [ "-ldflags=-s -w -X main.Version=${version} -X main.GitTag=${src.rev} -X main.BuildDate=unknown" ];
+
+ meta = with stdenv.lib; {
homepage = "https://github.com/securego/gosec";
- license = licenses.asl20 ;
- maintainers = with maintainers; [ kalbasit ];
+ description = "Golang security checker";
+ license = licenses.asl20;
+ maintainers = with maintainers; [ kalbasit nilp0inter ];
platforms = platforms.linux ++ platforms.darwin;
};
}
+
diff --git a/nixpkgs/pkgs/development/tools/gosec/deps.nix b/nixpkgs/pkgs/development/tools/gosec/deps.nix
deleted file mode 100644
index 80a77e7fb80..00000000000
--- a/nixpkgs/pkgs/development/tools/gosec/deps.nix
+++ /dev/null
@@ -1,193 +0,0 @@
-# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
-[
-
- {
- goPackagePath = "github.com/davecgh/go-spew";
- fetch = {
- type = "git";
- url = "https://github.com/davecgh/go-spew";
- rev = "v1.1.1";
- sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y";
- };
- }
-
- {
- goPackagePath = "github.com/golang/protobuf";
- fetch = {
- type = "git";
- url = "https://github.com/golang/protobuf";
- rev = "v1.2.0";
- sha256 = "0kf4b59rcbb1cchfny2dm9jyznp8ri2hsb14n8iak1q8986xa0ab";
- };
- }
-
- {
- goPackagePath = "github.com/kisielk/gotool";
- fetch = {
- type = "git";
- url = "https://github.com/kisielk/gotool";
- rev = "0de1eaf82fa3";
- sha256 = "177af7bjq6clmkqshnmnwlpwvx80kpi2277q275iwq59lp48viq1";
- };
- }
-
- {
- goPackagePath = "github.com/kr/pretty";
- fetch = {
- type = "git";
- url = "https://github.com/kr/pretty";
- rev = "v0.1.0";
- sha256 = "18m4pwg2abd0j9cn5v3k2ksk9ig4vlwxmlw9rrglanziv9l967qp";
- };
- }
-
- {
- goPackagePath = "github.com/kr/pty";
- fetch = {
- type = "git";
- url = "https://github.com/kr/pty";
- rev = "v1.1.1";
- sha256 = "0383f0mb9kqjvncqrfpidsf8y6ns5zlrc91c6a74xpyxjwvzl2y6";
- };
- }
-
- {
- goPackagePath = "github.com/kr/text";
- fetch = {
- type = "git";
- url = "https://github.com/kr/text";
- rev = "v0.1.0";
- sha256 = "1gm5bsl01apvc84bw06hasawyqm4q84vx1pm32wr9jnd7a8vjgj1";
- };
- }
-
- {
- goPackagePath = "github.com/nbutton23/zxcvbn-go";
- fetch = {
- type = "git";
- url = "https://github.com/nbutton23/zxcvbn-go";
- rev = "a22cb81b2ecd";
- sha256 = "0hm16vc7xrw0cqla6xcn59bb7n2sa0j8rkniywn5dqnbrpza12cd";
- };
- }
-
- {
- goPackagePath = "github.com/onsi/ginkgo";
- fetch = {
- type = "git";
- url = "https://github.com/onsi/ginkgo";
- rev = "11459a886d9c";
- sha256 = "1nswc1fnrrs792qbix05h91bilj8rr3wxmxgwi97p2gjk0r292zh";
- };
- }
-
- {
- goPackagePath = "github.com/onsi/gomega";
- fetch = {
- type = "git";
- url = "https://github.com/onsi/gomega";
- rev = "dcabb60a477c";
- sha256 = "1775lv5jbsgv3ghq5v2827slqlhqdadrzc1nkpq4y0hdv2qzrgkm";
- };
- }
-
- {
- goPackagePath = "github.com/pmezard/go-difflib";
- fetch = {
- type = "git";
- url = "https://github.com/pmezard/go-difflib";
- rev = "v1.0.0";
- sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw";
- };
- }
-
- {
- goPackagePath = "github.com/ryanuber/go-glob";
- fetch = {
- type = "git";
- url = "https://github.com/ryanuber/go-glob";
- rev = "256dc444b735";
- sha256 = "07rsd7hranghwc68ib0r2zxd9d5djanzjvd84j9dgj3wqsyg5mi2";
- };
- }
-
- {
- goPackagePath = "github.com/stretchr/testify";
- fetch = {
- type = "git";
- url = "https://github.com/stretchr/testify";
- rev = "v1.2.2";
- sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs";
- };
- }
-
- {
- goPackagePath = "golang.org/x/net";
- fetch = {
- type = "git";
- url = "https://go.googlesource.com/net";
- rev = "8351a756f30f";
- sha256 = "0b6m579i3wrx1m69mqkdng5gjfssprxx0pg45kzrdi68sh0zr5d1";
- };
- }
-
- {
- goPackagePath = "golang.org/x/sync";
- fetch = {
- type = "git";
- url = "https://go.googlesource.com/sync";
- rev = "1d60e4601c6f";
- sha256 = "046jlanz2lkxq1r57x9bl6s4cvfqaic6p2xybsj8mq1120jv4rs6";
- };
- }
-
- {
- goPackagePath = "golang.org/x/sys";
- fetch = {
- type = "git";
- url = "https://go.googlesource.com/sys";
- rev = "164713f0dfce";
- sha256 = "1qn9vvyqsaaj0az0rbilzc4pfv9sl4vh78c2g37yya5gcdnarh3w";
- };
- }
-
- {
- goPackagePath = "golang.org/x/text";
- fetch = {
- type = "git";
- url = "https://go.googlesource.com/text";
- rev = "1cbadb444a80";
- sha256 = "0ih9ysagh4ylj08393497sscf3yziybc6acg4mrh0wa7mld75j56";
- };
- }
-
- {
- goPackagePath = "golang.org/x/tools";
- fetch = {
- type = "git";
- url = "https://go.googlesource.com/tools";
- rev = "e531a2a1c15f";
- sha256 = "0740w56nmjqdj7ld1h3gpcpi3x8n81bdx0pp267rz9hmwkrb2s1c";
- };
- }
-
- {
- goPackagePath = "gopkg.in/check.v1";
- fetch = {
- type = "git";
- url = "https://gopkg.in/check.v1";
- rev = "788fd7840127";
- sha256 = "0v3bim0j375z81zrpr5qv42knqs0y2qv2vkjiqi5axvb78slki1a";
- };
- }
-
- {
- goPackagePath = "gopkg.in/yaml.v2";
- fetch = {
- type = "git";
- url = "https://gopkg.in/yaml.v2";
- rev = "eb3733d160e7";
- sha256 = "1srhvcaa9db3a6xj29mkjr5kg33y71pclrlx4vcwz5m1lgb5c7q6";
- };
- }
-]