nixpkgs/pkgs/tools/misc/atuin/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.1 KiB
Nix
Raw Normal View History

2021-05-08 09:28:16 +00:00
{ lib
2021-05-11 21:02:05 +00:00
, stdenv
2021-05-08 09:28:16 +00:00
, fetchFromGitHub
, installShellFiles
2021-05-08 09:28:16 +00:00
, rustPlatform
2021-05-11 21:02:05 +00:00
, libiconv
, Security
, SystemConfiguration
2021-05-08 09:28:16 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "atuin";
2022-06-06 11:37:49 +00:00
version = "0.10.0";
2021-05-08 09:28:16 +00:00
src = fetchFromGitHub {
owner = "ellie";
repo = pname;
rev = "v${version}";
2022-06-06 11:37:49 +00:00
sha256 = "sha256-tBOJkAQCL2YGEJ3gJPxBC0swMuwOQENnhLXyms8WW6g";
2021-05-08 09:28:16 +00:00
};
2022-06-06 11:37:49 +00:00
cargoSha256 = "sha256-P4jcJ6pl3ZGjiwNYfEjEiNVnE6mTDRUGl6gZW65Jn0I";
nativeBuildInputs = [ installShellFiles ];
2021-05-08 09:28:16 +00:00
2021-05-11 21:02:05 +00:00
buildInputs = lib.optionals stdenv.isDarwin [ libiconv Security SystemConfiguration ];
postInstall = ''
installShellCompletion --cmd atuin \
2022-04-13 10:54:54 +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-05-08 09:28:16 +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;
maintainers = with maintainers; [ onsails SuperSandro2000 sciencentistguy ];
2021-05-08 09:28:16 +00:00
};
}