Skip to content

Commit

Permalink
chore: update flake
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Csati <[email protected]>
  • Loading branch information
csatib02 committed Jun 25, 2024
1 parent 3f985b2 commit 5cf40bb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 52 deletions.
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 7 additions & 45 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
description = "Go libraries for interacting with Hashicorp Vault";

inputs = {
# nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
devenv.url = "github:cachix/devenv";
};
Expand Down Expand Up @@ -40,16 +39,20 @@
packages = with pkgs; [
gnumake

# golangci-lint
goreleaser

# golangci-lint
# TODO: remove once https://github.com/NixOS/nixpkgs/pull/254878 hits unstable
(golangci-lint.override (prev: {
buildGoModule = pkgs.buildGo121Module;
}))

kubectl

yamllint
hadolint
] ++ [
self'.packages.licensei
self'.packages.golangci-lint
];

env = {
Expand Down Expand Up @@ -116,47 +119,6 @@
"-X github.com/hashicorp/vault/sdk/version.VersionPrerelease="
];
};

golangci-lint = pkgs.buildGo121Module rec {
pname = "golangci-lint";
version = "1.54.2";

src = pkgs.fetchFromGitHub {
owner = "golangci";
repo = "golangci-lint";
rev = "v${version}";
hash = "sha256-7nbgiUrp7S7sXt7uFXX8NHYbIRLZZQcg+18IdwAZBfE=";
};

vendorHash = "sha256-IyH5lG2a4zjsg/MUonCUiAgMl4xx8zSflRyzNgk8MR0=";

subPackages = [ "cmd/golangci-lint" ];

nativeBuildInputs = [ pkgs.installShellFiles ];

ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.commit=v${version}"
"-X main.date=19700101-00:00:00"
];

postInstall = ''
for shell in bash zsh fish; do
HOME=$TMPDIR $out/bin/golangci-lint completion $shell > golangci-lint.$shell
installShellCompletion golangci-lint.$shell
done
'';

meta = with pkgs.lib; {
description = "Fast linters Runner for Go";
homepage = "https://golangci-lint.run/";
changelog = "https://github.com/golangci/golangci-lint/blob/v${version}/CHANGELOG.md";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ anpryl manveru mic92 ];
};
};
};
};
};
Expand Down

0 comments on commit 5cf40bb

Please sign in to comment.