mirror of
https://github.com/atuinsh/atuin.git
synced 2024-12-28 18:09:25 +01:00
662f2b84fd
This change saves us from needing to keep a copy of the checksum in atuin.nix, so that Cargo.lock can remain as the sole source of truth for the dependency versions.
44 lines
1.3 KiB
Nix
44 lines
1.3 KiB
Nix
# Atuin package definition
|
|
#
|
|
# This file will be similar to the package definition in nixpkgs:
|
|
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/atuin/default.nix
|
|
#
|
|
# Helpful documentation: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md
|
|
{
|
|
lib,
|
|
stdenv,
|
|
installShellFiles,
|
|
rustPlatform,
|
|
libiconv,
|
|
Security,
|
|
SystemConfiguration,
|
|
}:
|
|
rustPlatform.buildRustPackage {
|
|
name = "atuin";
|
|
|
|
src = lib.cleanSource ./.;
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
# Allow dependencies to be fetched from git and avoid having to set the outputHashes manually
|
|
allowBuiltinFetchGit = true;
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|