2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2021-12-21 02:18:32 +00:00
|
|
|
, installShellFiles
|
2021-05-20 23:08:51 +00:00
|
|
|
, rustPlatform
|
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
, SystemConfiguration
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "atuin";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.10.0";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ellie";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-tBOJkAQCL2YGEJ3gJPxBC0swMuwOQENnhLXyms8WW6g";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
cargoSha256 = "sha256-P4jcJ6pl3ZGjiwNYfEjEiNVnE6mTDRUGl6gZW65Jn0I";
|
2021-12-21 02:18:32 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security SystemConfiguration ];
|
|
|
|
|
2021-12-21 02:18:32 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd atuin \
|
2022-04-15 01:41:22 +00:00
|
|
|
--bash <($out/bin/atuin gen-completions -s bash) \
|
|
|
|
--fish <($out/bin/atuin gen-completions -s fish) \
|
|
|
|
--zsh <($out/bin/atuin gen-completions -s zsh)
|
2021-12-21 02:18:32 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Replacement for a shell history which records additional commands context with optional encrypted synchronization between machines";
|
|
|
|
homepage = "https://github.com/ellie/atuin";
|
|
|
|
license = licenses.mit;
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with maintainers; [ onsails SuperSandro2000 sciencentistguy ];
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
}
|