Skip to content

Instantly share code, notes, and snippets.

@risicle
Last active April 24, 2024 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save risicle/04e21a7146e82b7b12402055e90eed6f to your computer and use it in GitHub Desktop.
Save risicle/04e21a7146e82b7b12402055e90eed6f to your computer and use it in GitHub Desktop.
{ lib, stdenv, buildGoModule, aws-vault, makeWrapper, yubikey-manager, git }:
buildGoModule rec {
pname = "gds-cli";
version = "5.94.0";
src = (builtins.fetchGit {
url = "ssh://git@github.com/alphagov/gds-cli.git";
ref = "v${version}";
rev = "354c379f86cbbed230456bebb8087632aa56e2aa";
allRefs = true;
});
vendorSha256 = "sha256-EitW3dJCWnEfRPTucUsXwLgDEBONXuaPedL6mkfsZDs=";
preBuild = ''
go generate
# these require network access, and don't even build for me
rm -r test/
rm pkg/git/git_test.go
'';
nativeBuildInputs = [ makeWrapper git ];
postInstall = let
binPath = lib.makeBinPath [
aws-vault
yubikey-manager
git
];
in ''
wrapProgram $out/bin/gds-cli --prefix PATH : ${binPath}
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment