initial working version
This commit is contained in:
parent
db6b90134d
commit
d986a0b31a
19 changed files with 1430 additions and 0 deletions
28
flake.nix
28
flake.nix
|
|
@ -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
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue