2022-11-21 17:40:18 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, DiskArbitration
|
|
|
|
, Foundation
|
2023-03-24 00:07:29 +00:00
|
|
|
, withNotification ? false
|
|
|
|
, withYubikey ? false
|
|
|
|
, withStrictCaller ? false
|
|
|
|
, withAll ? false
|
2022-11-21 17:40:18 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "git-credential-keepassxc";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "0.12.0";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Frederick888";
|
|
|
|
repo = "git-credential-keepassxc";
|
|
|
|
rev = "v${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
hash = "sha256-siVSZke+anVTaLiJVyDEKvgX+VmS0axa+4721nlgmiw=";
|
2022-11-21 17:40:18 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
cargoHash = "sha256-QMAAKkjWgM/UiOfkNMLQxyGEYYmiSvE0Pd8fZXYyN48=";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ DiskArbitration Foundation ];
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
buildFeatures = []
|
|
|
|
++ lib.optional withNotification "notification"
|
|
|
|
++ lib.optional withYubikey "yubikey"
|
|
|
|
++ lib.optional withStrictCaller "strict-caller"
|
|
|
|
++ lib.optional withAll "all";
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Helper that allows Git (and shell scripts) to use KeePassXC as credential store";
|
|
|
|
longDescription = ''
|
|
|
|
git-credential-keepassxc is a Git credential helper that allows Git
|
|
|
|
(and shell scripts) to get/store logins from/to KeePassXC.
|
|
|
|
It communicates with KeePassXC using keepassxc-protocol which is
|
|
|
|
originally designed for browser extensions.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/Frederick888/git-credential-keepassxc";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ fgaz ];
|
|
|
|
};
|
|
|
|
}
|