2021-05-08 11:28:16 +02:00
|
|
|
{ lib
|
2021-05-11 23:02:05 +02:00
|
|
|
, stdenv
|
2021-05-08 11:28:16 +02:00
|
|
|
, fetchFromGitHub
|
2021-12-19 07:19:27 +01:00
|
|
|
, installShellFiles
|
2021-05-08 11:28:16 +02:00
|
|
|
, rustPlatform
|
2021-05-11 23:02:05 +02:00
|
|
|
, libiconv
|
|
|
|
, Security
|
|
|
|
, SystemConfiguration
|
2021-05-08 11:28:16 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "atuin";
|
2021-12-19 07:19:27 +01:00
|
|
|
version = "0.8.0";
|
2021-05-08 11:28:16 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ellie";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-19 07:19:27 +01:00
|
|
|
sha256 = "sha256-I/ZDaOAiHdWOkmf+jIWWxZ3C25UHsl6MB7mCRLADFNs=";
|
2021-05-08 11:28:16 +02:00
|
|
|
};
|
|
|
|
|
2021-12-19 07:19:27 +01:00
|
|
|
cargoSha256 = "sha256-KMss6Mpn4LHnkhtJyRea+D7mKItBK4lqq9syFEmCiFo=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2021-05-08 11:28:16 +02:00
|
|
|
|
2021-05-11 23:02:05 +02:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security SystemConfiguration ];
|
|
|
|
|
2021-12-19 07:19:27 +01:00
|
|
|
postInstall = ''
|
|
|
|
HOME=$(mktemp -d)
|
|
|
|
for shell in bash fish zsh; do
|
|
|
|
$out/bin/atuin gen-completions -s $shell -o .
|
|
|
|
done
|
|
|
|
|
|
|
|
installShellCompletion --cmd atuin \
|
|
|
|
--bash atuin.bash \
|
|
|
|
--fish atuin.fish \
|
|
|
|
--zsh _atuin
|
|
|
|
'';
|
|
|
|
|
2021-05-08 11:28:16 +02: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;
|
2021-12-19 07:19:27 +01:00
|
|
|
maintainers = with maintainers; [ onsails SuperSandro2000 ];
|
2021-05-08 11:28:16 +02:00
|
|
|
};
|
|
|
|
}
|