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
|
2022-12-17 10:02:37 +00:00
|
|
|
, nixosTests
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "atuin";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "12.0.0";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ellie";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-kt0Xu95E3MayUybSh1mU5frJoU7BF41Hnjqqrz/cVHE=";
|
2021-05-20 23:08:51 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
cargoSha256 = "sha256-WAAelEFtHlFGDk0AI381OS5bxN58Z46kyMAuL+XX/Ac=";
|
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
|
|
|
'';
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit (nixosTests) atuin;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|