2021-06-28 23:13:55 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2022-06-16 17:23:12 +00:00
|
|
|
, fetchpatch
|
2021-06-28 23:13:55 +00:00
|
|
|
, asciidoc
|
|
|
|
, cmake
|
|
|
|
, docbook_xsl
|
|
|
|
, pkg-config
|
|
|
|
, bash-completion
|
|
|
|
, openssl
|
|
|
|
, curl
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "lastpass-cli";
|
|
|
|
version = "1.3.3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lastpass";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "168jg8kjbylfgalhicn0llbykd7kdc9id2989gg0nxlgmnvzl58a";
|
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
# Pull fix pending upstream inclusion for -fno-common toolchains:
|
|
|
|
# https://github.com/lastpass/lastpass-cli/pull/576
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://github.com/lastpass/lastpass-cli/commit/e3311cebdb29a3267843cf656a32f01c5062897e.patch";
|
|
|
|
sha256 = "1yjx2p98nb3n8ywc9lhf2zal5fswawb5i6lgnicdin23zngff5l8";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ asciidoc cmake docbook_xsl pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-28 23:13:55 +00:00
|
|
|
bash-completion
|
|
|
|
curl
|
|
|
|
openssl
|
|
|
|
libxml2
|
|
|
|
libxslt
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installTargets = [ "install" "install-doc" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -Dm644 -T ../contrib/lpass_zsh_completion $out/share/zsh/site-functions/_lpass
|
|
|
|
install -Dm644 -T ../contrib/completions-lpass.fish $out/share/fish/vendor_completions.d/lpass.fish
|
2021-06-28 23:13:55 +00:00
|
|
|
install -Dm755 -T ../contrib/examples/git-credential-lastpass $out/bin/git-credential-lastpass
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Stores, retrieves, generates, and synchronizes passwords securely";
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://github.com/lastpass/lastpass-cli";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
};
|
|
|
|
}
|