From b2a0986ca61f8557f51b36f2cdc045143788ae12 Mon Sep 17 00:00:00 2001 From: Jamie Quigley Date: Wed, 15 Feb 2023 09:04:07 +0000 Subject: Add nix files and install instructions (#477) --- atuin.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 atuin.nix (limited to 'atuin.nix') diff --git a/atuin.nix b/atuin.nix new file mode 100644 index 00000000..606e6875 --- /dev/null +++ b/atuin.nix @@ -0,0 +1,34 @@ +{ + lib, + stdenv, + fetchFromGitHub, + installShellFiles, + rustPlatform, + libiconv, + Security, + SystemConfiguration, +}: +rustPlatform.buildRustPackage rec { + name = "atuin"; + + src = lib.cleanSource ./.; + + cargoLock.lockFile = ./Cargo.lock; + + 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; + }; +} -- cgit v1.3.1