2023-03-31 10:58:57 +03:00
|
|
|
# Atuin package definition
|
|
|
|
#
|
|
|
|
# This file will be similar to the package definition in nixpkgs:
|
2024-03-05 13:02:57 +03:00
|
|
|
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/at/atuin/package.nix
|
2023-03-31 10:58:57 +03:00
|
|
|
#
|
|
|
|
# Helpful documentation: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md
|
2023-02-15 12:04:07 +03:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
installShellFiles,
|
|
|
|
rustPlatform,
|
|
|
|
libiconv,
|
|
|
|
Security,
|
|
|
|
SystemConfiguration,
|
2023-10-30 11:18:26 +03:00
|
|
|
AppKit,
|
2023-02-15 12:04:07 +03:00
|
|
|
}:
|
2023-03-31 10:58:57 +03:00
|
|
|
rustPlatform.buildRustPackage {
|
2023-02-15 12:04:07 +03:00
|
|
|
name = "atuin";
|
|
|
|
|
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
|
2023-03-31 10:58:57 +03:00
|
|
|
cargoLock = {
|
|
|
|
lockFile = ./Cargo.lock;
|
|
|
|
# Allow dependencies to be fetched from git and avoid having to set the outputHashes manually
|
|
|
|
allowBuiltinFetchGit = true;
|
|
|
|
};
|
2023-02-15 12:04:07 +03:00
|
|
|
|
|
|
|
nativeBuildInputs = [installShellFiles];
|
|
|
|
|
2024-06-12 18:45:38 +03:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [libiconv Security SystemConfiguration AppKit];
|
2023-02-15 12:04:07 +03:00
|
|
|
|
|
|
|
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)
|
|
|
|
'';
|
|
|
|
|
2024-01-29 15:44:06 +03:00
|
|
|
doCheck = false;
|
2023-07-28 10:49:42 +03:00
|
|
|
|
2023-02-15 12:04:07 +03:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Replacement for a shell history which records additional commands context with optional encrypted synchronization between machines";
|
2023-07-31 01:08:00 +03:00
|
|
|
homepage = "https://github.com/atuinsh/atuin";
|
2023-02-15 12:04:07 +03:00
|
|
|
license = licenses.mit;
|
2024-03-05 13:02:57 +03:00
|
|
|
mainProgram = "atuin";
|
2023-02-15 12:04:07 +03:00
|
|
|
};
|
|
|
|
}
|