aboutsummaryrefslogtreecommitdiffstats
path: root/nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-08-22 21:09:14 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-08-22 21:09:14 +0200
commit2507bb0a7713d7d534a18812e2ed4247cff43325 (patch)
tree6596ae9d9904b9caa19f69db866cdd5aaedfd1ac /nix
parentfeat: Finalize design for fish-shell integration (diff)
downloadatuin-2507bb0a7713d7d534a18812e2ed4247cff43325.zip
fix(nix): Update all references and switch build to crane
Diffstat (limited to '')
-rw-r--r--nix/module.nix2
-rw-r--r--nix/package.nix28
2 files changed, 17 insertions, 13 deletions
diff --git a/nix/module.nix b/nix/module.nix
index 60878e7e..30ff417b 100644
--- a/nix/module.nix
+++ b/nix/module.nix
@@ -89,7 +89,7 @@ in {
wantedBy = ["multi-user.target"];
serviceConfig = {
- ExecStart = "${lib.getExe' cfg.package "atuin"} server start";
+ ExecStart = "${lib.getExe' cfg.package "turtle-server"} start";
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) [cfg.environmentFile];
RuntimeDirectory = "turtle";
RuntimeDirectoryMode = "0700";
diff --git a/nix/package.nix b/nix/package.nix
index 3fd24aee..1f4d5498 100644
--- a/nix/package.nix
+++ b/nix/package.nix
@@ -8,11 +8,11 @@
lib,
stdenv,
installShellFiles,
- rustPlatform,
libiconv,
+ craneLib,
}:
-rustPlatform.buildRustPackage {
- name = "turtle";
+craneLib.buildPackage {
+ pname = "turtle";
version = "19.0.0";
src = lib.cleanSourceWith {
@@ -36,21 +36,25 @@ rustPlatform.buildRustPackage {
|| (lib.strings.hasSuffix ".sql" (builtins.baseNameOf name));
};
- cargoLock = {
- lockFile = ../Cargo.lock;
- # Allow dependencies to be fetched from git and avoid having to set the outputHashes manually
- allowBuiltinFetchGit = true;
+ env = {
+ CARGO_PROFILE = "dev";
};
+ # 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];
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)
+ installShellCompletion --cmd turtle \
+ --bash <($out/bin/turtle gen-completions -s bash) \
+ --fish <($out/bin/turtle gen-completions -s fish) \
+ --zsh <($out/bin/turtle gen-completions -s zsh)
'';
doCheck = false;
@@ -59,6 +63,6 @@ rustPlatform.buildRustPackage {
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";
+ mainProgram = "turtle";
};
}