summaryrefslogtreecommitdiffstats
path: root/atuin.nix
diff options
context:
space:
mode:
authorJamie Quigley <jamie@quigley.xyz>2023-02-15 09:04:07 +0000
committerGitHub <noreply@github.com>2023-02-15 09:04:07 +0000
commitb2a0986ca61f8557f51b36f2cdc045143788ae12 (patch)
tree975476ab9e438958f9b1281c469c489a606e9dd2 /atuin.nix
parentdcfad9a90d4b18465c437811698c879c4c5a9fcc (diff)
Add nix files and install instructions (#477)
Diffstat (limited to 'atuin.nix')
-rw-r--r--atuin.nix34
1 files changed, 34 insertions, 0 deletions
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;
+ };
+}