2021-05-08 10:28:16 +01:00
|
|
|
{ lib
|
2021-05-11 22:02:05 +01:00
|
|
|
, stdenv
|
2021-05-08 10:28:16 +01:00
|
|
|
, fetchFromGitHub
|
2021-12-19 06:19:27 +00:00
|
|
|
, installShellFiles
|
2021-05-08 10:28:16 +01:00
|
|
|
, rustPlatform
|
2021-05-11 22:02:05 +01:00
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
, SystemConfiguration
|
2021-05-08 10:28:16 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "atuin";
|
2022-04-25 02:55:44 +01:00
|
|
|
version = "0.9.1";
|
2021-05-08 10:28:16 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ellie";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-04-25 02:55:44 +01:00
|
|
|
sha256 = "sha256-TrIBNvK8Kyp0FgLZ3Q1n/Dl4V/yateP2v2ei5IIpi44=";
|
2021-05-08 10:28:16 +01:00
|
|
|
};
|
|
|
|
|
2022-04-25 02:55:44 +01:00
|
|
|
cargoSha256 = "sha256-42eMvUbH7eEvTcEfLtDRNy6psbdQXDsZQbpyqZFjF4c=";
|
2021-12-19 06:19:27 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2021-05-08 10:28:16 +01:00
|
|
|
|
2021-05-11 22:02:05 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security SystemConfiguration ];
|
|
|
|
|
2021-12-19 06:19:27 +00:00
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd atuin \
|
2022-04-13 11:54:54 +01: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-19 06:19:27 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-08 10:28:16 +01: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-12 10:38:16 +01:00
|
|
|
maintainers = with maintainers; [ onsails SuperSandro2000 sciencentistguy ];
|
2021-05-08 10:28:16 +01:00
|
|
|
};
|
|
|
|
}
|