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

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

47 lines
1.2 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
, nixosTests
2021-05-08 09:28:16 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "atuin";
2022-11-07 05:53:05 +00:00
version = "12.0.0";
2021-05-08 09:28:16 +00:00
src = fetchFromGitHub {
owner = "ellie";
repo = pname;
rev = "v${version}";
2022-11-07 05:53:05 +00:00
sha256 = "sha256-kt0Xu95E3MayUybSh1mU5frJoU7BF41Hnjqqrz/cVHE=";
2021-05-08 09:28:16 +00:00
};
2022-11-07 05:53:05 +00:00
cargoSha256 = "sha256-WAAelEFtHlFGDk0AI381OS5bxN58Z46kyMAuL+XX/Ac=";
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)
'';
passthru.tests = {
inherit (nixosTests) atuin;
};
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
};
}