mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-07 08:54:35 +01:00
9fa223eaaf
* chore(build): compile protobufs with protox protox is a pure-rust implementation of the protobuf compiler. Therefore, it can be managed by cargo. This removes the implicit dependency on protoc being available in the environment for the build. * fix(build): replace copypasta in build script The paths passed to `compile` aren't actually used by the build. `skip_protoc_run` prevents that. That's why a clean build succeeds even with this mistake. However, the paths are passed to a `cargo:rerun-if-changed` directive. So this mistake would've caused a failed incremental build if the protobuf definitions were changed.
48 lines
1.3 KiB
Nix
48 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/by-name/at/atuin/package.nix
|
|
#
|
|
# Helpful documentation: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md
|
|
{
|
|
lib,
|
|
stdenv,
|
|
installShellFiles,
|
|
rustPlatform,
|
|
libiconv,
|
|
Security,
|
|
SystemConfiguration,
|
|
AppKit,
|
|
}:
|
|
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 AppKit];
|
|
|
|
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)
|
|
'';
|
|
|
|
doCheck = false;
|
|
|
|
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;
|
|
mainProgram = "atuin";
|
|
};
|
|
}
|