generated from d2iq-archive/golang-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7d58412
commit 4e0a7f1
Showing
8 changed files
with
169 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
{ | ||
"packages": [ | ||
"[email protected]", | ||
"bash@latest", | ||
"coreutils@latest", | ||
"crane@latest", | ||
|
@@ -10,14 +9,14 @@ | |
"gnused@latest", | ||
"gnugrep@latest", | ||
"gnumake@latest", | ||
"go@latest", | ||
"gojq@latest", | ||
"golangci-lint@latest", | ||
"path:./hack/flakes/golangci-lint", | ||
"golines@latest", | ||
"goreleaser@latest", | ||
"gotestsum@latest", | ||
"kubernetes-helm@latest", | ||
"pre-commit@latest", | ||
"shfmt@latest", | ||
"upx@latest" | ||
"shfmt@latest" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,24 +55,32 @@ | |
"source": "devbox-search", | ||
"version": "4.9" | ||
}, | ||
"[email protected]": { | ||
"last_modified": "2023-06-30T04:44:22Z", | ||
"resolved": "github:NixOS/nixpkgs/3c614fbc76fc152f3e1bc4b2263da6d90adf80fb#go", | ||
"source": "devbox-search", | ||
"version": "1.20.5" | ||
"go@latest": { | ||
"last_modified": "2023-09-27T18:02:17Z", | ||
"resolved": "github:NixOS/nixpkgs/517501bcf14ae6ec47efd6a17dda0ca8e6d866f9#go_1_21", | ||
"source": "devbox-search", | ||
"version": "1.21.1", | ||
"systems": { | ||
"aarch64-darwin": { | ||
"store_path": "/nix/store/s1xk6hrfn0kw8ycvqbx4vv4gr00k6qpl-go-1.21.1" | ||
}, | ||
"aarch64-linux": { | ||
"store_path": "/nix/store/id3ygqxp1hvbh7dyjlwngx53fvcpqg84-go-1.21.1" | ||
}, | ||
"x86_64-darwin": { | ||
"store_path": "/nix/store/yn0g820ayb963s0i4nnw9pf72l49kkg0-go-1.21.1" | ||
}, | ||
"x86_64-linux": { | ||
"store_path": "/nix/store/pvvv2lmx9m8b2n0447mljrl5xmla8r3h-go-1.21.1" | ||
} | ||
} | ||
}, | ||
"gojq@latest": { | ||
"last_modified": "2023-06-29T16:20:38Z", | ||
"resolved": "github:NixOS/nixpkgs/3c614fbc76fc152f3e1bc4b2263da6d90adf80fb#gojq", | ||
"source": "devbox-search", | ||
"version": "0.12.13" | ||
}, | ||
"golangci-lint@latest": { | ||
"last_modified": "2023-06-29T16:20:38Z", | ||
"resolved": "github:NixOS/nixpkgs/3c614fbc76fc152f3e1bc4b2263da6d90adf80fb#golangci-lint", | ||
"source": "devbox-search", | ||
"version": "1.53.3" | ||
}, | ||
"golines@latest": { | ||
"last_modified": "2023-05-07T06:59:10Z", | ||
"resolved": "github:NixOS/nixpkgs/eb751d65225ec53de9cf3d88acbf08d275882389#golines", | ||
|
@@ -108,12 +116,6 @@ | |
"resolved": "github:NixOS/nixpkgs/3c614fbc76fc152f3e1bc4b2263da6d90adf80fb#shfmt", | ||
"source": "devbox-search", | ||
"version": "3.7.0" | ||
}, | ||
"upx@latest": { | ||
"last_modified": "2023-05-07T06:59:10Z", | ||
"resolved": "github:NixOS/nixpkgs/eb751d65225ec53de9cf3d88acbf08d275882389#upx", | ||
"source": "devbox-search", | ||
"version": "4.0.2" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Copyright 2023 D2iQ, Inc. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
{ | ||
description = "Fast linters Runner for Go"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | ||
utils.url = "github:numtide/flake-utils/v1.0.0"; | ||
}; | ||
|
||
outputs = | ||
{ self | ||
, nixpkgs | ||
, utils | ||
, | ||
}: | ||
let | ||
appReleaseVersion = "1.54.2"; | ||
appReleaseBinaries = { | ||
"x86_64-linux" = { | ||
fileName = "golangci-lint-${appReleaseVersion}-linux-amd64.tar.gz"; | ||
sha256 = "17c9ca05253efe833d47f38caf670aad2202b5e6515879a99873fabd4c7452b3"; | ||
}; | ||
"x86_64-darwin" = { | ||
fileName = "golangci-lint-${appReleaseVersion}-darwin-amd64.tar.gz"; | ||
sha256 = "925c4097eae9e035b0b052a66d0a149f861e2ab611a4e677c7ffd2d4e05b9b89"; | ||
}; | ||
"aarch64-darwin" = { | ||
fileName = "golangci-lint-${appReleaseVersion}-darwin-arm64.tar.gz"; | ||
sha256 = "7b33fb1be2f26b7e3d1f3c10ce9b2b5ce6d13bb1d8468a4b2ba794f05b4445e1"; | ||
}; | ||
}; | ||
supportedSystems = builtins.attrNames appReleaseBinaries; | ||
in | ||
utils.lib.eachSystem supportedSystems (system: | ||
let | ||
pkgs = nixpkgs.legacyPackages.${system}; | ||
appReleaseBinary = appReleaseBinaries.${system}; | ||
in | ||
rec { | ||
packages.golangci-lint = pkgs.stdenv.mkDerivation { | ||
pname = "golangci-lint"; | ||
version = appReleaseVersion; | ||
|
||
src = pkgs.fetchurl { | ||
url = "https://github.com/golangci/golangci-lint/releases/download/v${appReleaseVersion}/${appReleaseBinary.fileName}"; | ||
sha256 = appReleaseBinary.sha256; | ||
}; | ||
|
||
sourceRoot = "."; | ||
|
||
installPhase = '' | ||
install -m755 -D */golangci-lint $out/bin/golangci-lint | ||
''; | ||
}; | ||
packages.default = packages.golangci-lint; | ||
|
||
apps.golangci-lint = utils.lib.mkApp { | ||
drv = packages.golangci-lint; | ||
}; | ||
apps.default = apps.golangci-lint; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters