1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-04 03:11:55 +02:00
goreleaser/flake.nix
Carlos Alexandro Becker 5296d350dc
chore: update flake
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-12-31 14:43:09 -03:00

50 lines
1.4 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
staging.url = "github:caarlos0/nixpkgs/wip";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, staging, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
staging-pkgs = staging.legacyPackages.${system};
in
{
packages.default = pkgs.buildGoModule {
pname = "goreleaser";
version = "unversioned";
src = ./.;
ldflags = [ "-s" "-w" "-X main.version=dev" "-X main.builtBy=flake" ];
doCheck = false;
vendorHash = "sha256-wY3kIhNIqTaK9MT1VeePERNhqvbtf6bsyRTjG8nrqxU=";
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
go
go-task
gofumpt
syft
upx
cosign
];
shellHook = "go mod tidy";
};
devShells.docs = pkgs.mkShell {
packages = with pkgs; with staging-pkgs.python311Packages; [
go-task
htmltest
mkdocs-material
mkdocs-redirects
mkdocs-minify
mkdocs-rss-plugin
mkdocs-include-markdown-plugin
] ++ mkdocs-material.passthru.optional-dependencies.git;
};
}
);
}