2023-12-29 01:49:23 +02:00
|
|
|
{
|
|
|
|
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=";
|
|
|
|
};
|
|
|
|
|
2024-02-05 01:02:35 +02:00
|
|
|
devShells.default = pkgs.mkShellNoCC {
|
2023-12-31 19:43:09 +02:00
|
|
|
packages = with pkgs; [
|
2023-12-29 01:49:23 +02:00
|
|
|
go
|
|
|
|
go-task
|
|
|
|
gofumpt
|
2023-12-31 19:43:09 +02:00
|
|
|
syft
|
|
|
|
upx
|
|
|
|
cosign
|
2024-01-22 04:10:35 +02:00
|
|
|
gnupg
|
2023-12-29 01:49:23 +02:00
|
|
|
];
|
|
|
|
shellHook = "go mod tidy";
|
|
|
|
};
|
|
|
|
|
2024-02-05 01:02:35 +02:00
|
|
|
devShells.docs = pkgs.mkShellNoCC {
|
2023-12-29 01:49:23 +02:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|