about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
author0x4A6F <0x4A6F@users.noreply.github.com>2024-02-09 14:12:05 +0100
committer0x4A6F <0x4A6F@users.noreply.github.com>2024-02-10 16:32:20 +0100
commit3b5e4b9d76ea433477aea67a9fef55e800a9af7e (patch)
treefe9db588222bd7acbed920b19acbbb37220f8b36 /pkgs/by-name
parent9a113b42b3b15eafa91a027bd9fb9fd69fa6ed96 (diff)
downloadnixlib-3b5e4b9d76ea433477aea67a9fef55e800a9af7e.tar
nixlib-3b5e4b9d76ea433477aea67a9fef55e800a9af7e.tar.gz
nixlib-3b5e4b9d76ea433477aea67a9fef55e800a9af7e.tar.bz2
nixlib-3b5e4b9d76ea433477aea67a9fef55e800a9af7e.tar.lz
nixlib-3b5e4b9d76ea433477aea67a9fef55e800a9af7e.tar.xz
nixlib-3b5e4b9d76ea433477aea67a9fef55e800a9af7e.tar.zst
nixlib-3b5e4b9d76ea433477aea67a9fef55e800a9af7e.zip
atuin: 17.2.1 -> 18.0.0
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/at/atuin/package.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/by-name/at/atuin/package.nix b/pkgs/by-name/at/atuin/package.nix
new file mode 100644
index 000000000000..205fa7790a5b
--- /dev/null
+++ b/pkgs/by-name/at/atuin/package.nix
@@ -0,0 +1,65 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, installShellFiles
+, rustPlatform
+, libiconv
+, darwin
+, nixosTests
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "atuin";
+  version = "18.0.0";
+
+  src = fetchFromGitHub {
+    owner = "atuinsh";
+    repo = "atuin";
+    rev = "v${version}";
+    hash = "sha256-2nBaGoaTd1TGm8aZnrNA66HkW7+OrD6gOmj+uSFz020=";
+  };
+
+  # TODO: unify this to one hash because updater do not support this
+  cargoHash =
+    if stdenv.isLinux
+    then "sha256-Y+49R/foid+V83tY3bqf644OkMPukJxg2/ZVfJxDaFg="
+    else "sha256-gT2JRzBAF4IsXVv1Hvo6kr9qrNE/3bojtULCx6YawhA=";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [
+    libiconv
+    darwin.apple_sdk.frameworks.AppKit
+    darwin.apple_sdk.frameworks.Security
+    darwin.apple_sdk.frameworks.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)
+  '';
+
+  passthru.tests = {
+    inherit (nixosTests) atuin;
+  };
+
+  checkFlags = [
+    # tries to make a network access
+    "--skip=registration"
+    # No such file or directory (os error 2)
+    "--skip=sync"
+    # further failing tests
+    "--skip=change_password"
+    "--skip=multi_user_test"
+  ];
+
+  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;
+    maintainers = with maintainers; [ SuperSandro2000 sciencentistguy _0x4A6F ];
+    mainProgram = "atuin";
+  };
+}