initial working version

This commit is contained in:
Abel Luck 2026-02-26 11:05:16 +01:00
parent db6b90134d
commit d986a0b31a
19 changed files with 1430 additions and 0 deletions

View file

@ -22,14 +22,42 @@
self',
inputs',
pkgs,
lib,
system,
...
}:
{
packages.default = pkgs.buildGoModule {
pname = "nix-cache-login";
version = "0.1.0";
src = ./.;
vendorHash = "sha256-1s77IEGP7/6sgXSNdByRQqisLHSeJuRSsrnxUGfkxos=";
meta = {
description = "CLI tool for authenticating with a Nix binary cache via OIDC";
mainProgram = "nix-cache-login";
};
};
apps.default = {
type = "app";
program = "${self'.packages.default}/bin/nix-cache-login";
};
checks.tests = self'.packages.default.overrideAttrs (old: {
pname = "nix-cache-login-tests";
checkPhase = ''
runHook preCheck
go test ./...
runHook postCheck
'';
doCheck = true;
});
devShells = {
default = pkgs.mkShell {
packages = with pkgs; [
go
cobra-cli
];
};
};