Skip to content

Instantly share code, notes, and snippets.

@risicle
Created September 9, 2020 12:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save risicle/b23fd23b5978f1b60204248291a2a22e to your computer and use it in GitHub Desktop.
will use `pkgs`-provided aws-vault if >= 5.0.0, otherwise will substitute its own 6.0.0 (defined elsewhere)
args: oldAttrs: let
aws-vault = if
(builtins.compareVersions (builtins.parseDrvName args.pkgs.aws-vault.name).version "5.0.0") != -1 then args.pkgs.aws-vault
else (import ../aws-vault-6.nix {
inherit (args.pkgs) buildGoModule fetchFromGitHub;
inherit (args.pkgs.stdenv) lib;
});
in oldAttrs // {
buildInputs = oldAttrs.buildInputs ++ [
args.pkgs.vim
(import ../gds-cli.nix {
inherit aws-vault;
inherit (args.pkgs) stdenv buildGoModule yubikey-manager makeWrapper;
})
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment