mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, rustPlatform
|
|
, libiconv
|
|
, Security
|
|
, SystemConfiguration
|
|
, nixosTests
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "atuin";
|
|
version = "16.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "atuinsh";
|
|
repo = "atuin";
|
|
rev = "v${version}";
|
|
hash = "sha256-Kh6aaWYV+ZG7Asvw5JdGsV+nxD+xvvQab5wLIedcQcQ=";
|
|
};
|
|
|
|
# TODO: unify this to one hash because updater do not support this
|
|
cargoHash =
|
|
if stdenv.isLinux
|
|
then "sha256-Ami88ScGj58jCCat4MMDvjZtV5WglmrlggpQfo+LPjs="
|
|
else "sha256-HQMZ9w1C6go16XGrPNniQZliIQ/5yAp2w/uUwAOQTM0=";
|
|
|
|
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)
|
|
'';
|
|
|
|
passthru.tests = {
|
|
inherit (nixosTests) atuin;
|
|
};
|
|
|
|
checkFlags = [
|
|
# tries to make a network access
|
|
"--skip=registration"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Replacement for a shell history which records additional commands context with optional encrypted synchronization between machines";
|
|
homepage = "https://github.com/atuinsh/atuin";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ SuperSandro2000 sciencentistguy _0x4A6F ];
|
|
};
|
|
}
|