create a standalone package file

This commit is contained in:
Abel Luck 2026-02-26 11:24:48 +01:00
parent a11adaa58b
commit a3991af0ae
2 changed files with 23 additions and 10 deletions

View file

@ -12,16 +12,7 @@
in
{
packages = forAllSystems (pkgs: {
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";
};
};
default = pkgs.callPackage ./package.nix { };
});
apps = forAllSystems (pkgs: {

22
package.nix Normal file
View file

@ -0,0 +1,22 @@
{
lib,
buildGoModule,
fetchgit,
}:
buildGoModule {
pname = "nix-cache-login";
version = "0.1.0";
src = ./.;
# src = fetchgit {
# url = "https://guardianproject.dev/ops/nix-cache-login.git";
# rev = "v0.1.0";
# hash = "";
# };
vendorHash = "sha256-1s77IEGP7/6sgXSNdByRQqisLHSeJuRSsrnxUGfkxos=";
meta = {
description = "CLI tool for authenticating with a Nix binary cache via OIDC";
mainProgram = "nix-cache-login";
license = lib.licenses.gpl3Plus;
};
}