1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-04 03:11:55 +02:00
goreleaser/flake.nix

52 lines
1.5 KiB
Nix
Raw Normal View History

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2024-03-12 15:01:46 +02:00
carlos.url = "github:caarlos0/nur";
flake-utils.url = "github:numtide/flake-utils";
};
2024-03-12 15:01:46 +02:00
outputs = { nixpkgs, carlos, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
2024-03-12 15:01:46 +02:00
cpkgs = carlos.packages.${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-ND9owINZcsEBa1EmLCO40UdQ/11StPheQLJP6Ax13Mw=";
};
devShells.default = pkgs.mkShellNoCC {
packages = with pkgs; [
2024-02-13 04:22:55 +02:00
go_1_22
go-task
gofumpt
syft
upx
cosign
gnupg
2024-02-13 04:22:55 +02:00
nix-prefetch
];
shellHook = "go mod tidy";
};
devShells.docs = pkgs.mkShellNoCC {
2024-02-13 04:22:55 +02:00
packages = with pkgs; with pkgs.python311Packages; [
go-task
htmltest
mkdocs-material
mkdocs-redirects
mkdocs-minify
2024-03-12 15:01:46 +02:00
cpkgs.mkdocs-rss-plugin # https://github.com/NixOS/nixpkgs/pull/277350
cpkgs.mkdocs-include-markdown-plugin # https://github.com/NixOS/nixpkgs/pull/277351
] ++ mkdocs-material.passthru.optional-dependencies.git;
};
}
);
}