2021-06-10 13:48:27 +02:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
2022-05-21 12:28:13 +02:00
|
|
|
, fetchpatch
|
2021-06-10 13:48:27 +02:00
|
|
|
, asciidoc
|
|
|
|
, cmake
|
|
|
|
, docbook_xsl
|
|
|
|
, pkg-config
|
|
|
|
, bash-completion
|
|
|
|
, openssl
|
|
|
|
, curl
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
|
|
|
}:
|
2014-12-05 00:00:46 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-22 19:49:02 +01:00
|
|
|
pname = "lastpass-cli";
|
2019-04-16 11:29:56 +02:00
|
|
|
version = "1.3.3";
|
2014-12-05 00:00:46 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lastpass";
|
2019-03-22 19:49:02 +01:00
|
|
|
repo = pname;
|
2014-12-05 00:00:46 +01:00
|
|
|
rev = "v${version}";
|
2019-04-16 11:29:56 +02:00
|
|
|
sha256 = "168jg8kjbylfgalhicn0llbykd7kdc9id2989gg0nxlgmnvzl58a";
|
2014-12-05 00:00:46 +01:00
|
|
|
};
|
|
|
|
|
2022-05-21 12:28:13 +02: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-01-17 04:51:22 +01:00
|
|
|
nativeBuildInputs = [ asciidoc cmake docbook_xsl pkg-config ];
|
2018-01-06 16:42:52 +01:00
|
|
|
|
2014-12-05 00:00:46 +01:00
|
|
|
buildInputs = [
|
2021-06-10 13:48:27 +02:00
|
|
|
bash-completion
|
|
|
|
curl
|
|
|
|
openssl
|
|
|
|
libxml2
|
|
|
|
libxslt
|
2014-12-05 00:00:46 +01:00
|
|
|
];
|
|
|
|
|
2019-03-22 19:51:22 +01:00
|
|
|
installTargets = [ "install" "install-doc" ];
|
2014-12-05 00:00:46 +01:00
|
|
|
|
2019-03-22 19:51:22 +01:00
|
|
|
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-10 13:48:27 +02:00
|
|
|
install -Dm755 -T ../contrib/examples/git-credential-lastpass $out/bin/git-credential-lastpass
|
2019-03-22 19:51:22 +01:00
|
|
|
'';
|
2014-12-05 00:00:46 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Stores, retrieves, generates, and synchronizes passwords securely";
|
2021-06-10 13:48:27 +02:00
|
|
|
homepage = "https://github.com/lastpass/lastpass-cli";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2014-12-05 00:00:46 +01:00
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
};
|
|
|
|
}
|