2023-12-29 01:49:23 +02:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-03-12 15:01:46 +02:00
|
|
|
carlos.url = "github:caarlos0/nur";
|
2023-12-29 01:49:23 +02:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
};
|
2024-03-12 15:01:46 +02:00
|
|
|
outputs = { nixpkgs, carlos, flake-utils, ... }:
|
2023-12-29 01:49:23 +02:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
2024-03-12 15:01:46 +02:00
|
|
|
cpkgs = carlos.packages.${system};
|
2023-12-29 01:49:23 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
packages.default = pkgs.buildGoModule {
|
|
|
|
pname = "goreleaser";
|
|
|
|
version = "unversioned";
|
|
|
|
src = ./.;
|
|
|
|
ldflags = [ "-s" "-w" "-X main.version=dev" "-X main.builtBy=flake" ];
|
|
|
|
doCheck = false;
|
2024-04-03 04:35:12 +02:00
|
|
|
vendorHash = "";
|
2023-12-29 01:49:23 +02:00
|
|
|
};
|
|
|
|
|
2024-02-05 01:02:35 +02:00
|
|
|
devShells.default = pkgs.mkShellNoCC {
|
2024-08-15 19:35:03 +02:00
|
|
|
shellHook = "go mod tidy";
|
|
|
|
};
|
|
|
|
|
|
|
|
# nix develop .#dev
|
|
|
|
devShells.dev = pkgs.mkShellNoCC {
|
2023-12-31 19:43:09 +02:00
|
|
|
packages = with pkgs; [
|
2023-12-29 01:49:23 +02:00
|
|
|
go-task
|
|
|
|
gofumpt
|
2023-12-31 19:43:09 +02:00
|
|
|
syft
|
|
|
|
upx
|
|
|
|
cosign
|
2024-01-22 04:10:35 +02:00
|
|
|
gnupg
|
2024-02-13 04:22:55 +02:00
|
|
|
nix-prefetch
|
2024-07-24 00:44:16 +02:00
|
|
|
] ++ (lib.optionals pkgs.stdenv.isLinux [
|
2024-05-03 01:39:51 +02:00
|
|
|
snapcraft
|
2024-07-24 00:44:16 +02:00
|
|
|
]);
|
2023-12-29 01:49:23 +02:00
|
|
|
};
|
|
|
|
|
2024-08-15 19:35:03 +02:00
|
|
|
# nix develop .#docs
|
2024-02-05 01:02:35 +02:00
|
|
|
devShells.docs = pkgs.mkShellNoCC {
|
2024-02-13 04:22:55 +02:00
|
|
|
packages = with pkgs; with pkgs.python311Packages; [
|
2023-12-29 01:49:23 +02:00
|
|
|
go-task
|
|
|
|
htmltest
|
|
|
|
mkdocs-material
|
|
|
|
mkdocs-redirects
|
|
|
|
mkdocs-minify
|
2024-08-15 19:35:03 +02:00
|
|
|
mkdocs-rss-plugin
|
2024-09-04 00:57:29 +02:00
|
|
|
filelock
|
2024-03-12 15:01:46 +02:00
|
|
|
cpkgs.mkdocs-include-markdown-plugin # https://github.com/NixOS/nixpkgs/pull/277351
|
2023-12-29 01:49:23 +02:00
|
|
|
] ++ mkdocs-material.passthru.optional-dependencies.git;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|