aboutsummaryrefslogtreecommitdiffstats
path: root/nix/package.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--nix/package.nix28
1 files changed, 16 insertions, 12 deletions
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";
};
}