nixpkgs/pkgs/tools/misc/atuin/default.nix
2022-06-06 12:39:56 +01:00

42 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, installShellFiles
, rustPlatform
, libiconv
, Security
, SystemConfiguration
}:
rustPlatform.buildRustPackage rec {
pname = "atuin";
version = "0.10.0";
src = fetchFromGitHub {
owner = "ellie";
repo = pname;
rev = "v${version}";
sha256 = "sha256-tBOJkAQCL2YGEJ3gJPxBC0swMuwOQENnhLXyms8WW6g";
};
cargoSha256 = "sha256-P4jcJ6pl3ZGjiwNYfEjEiNVnE6mTDRUGl6gZW65Jn0I";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security SystemConfiguration ];
postInstall = ''
installShellCompletion --cmd atuin \
--bash <($out/bin/atuin gen-completions -s bash) \
--fish <($out/bin/atuin gen-completions -s fish) \
--zsh <($out/bin/atuin gen-completions -s zsh)
'';
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;
maintainers = with maintainers; [ onsails SuperSandro2000 sciencentistguy ];
};
}