feat: add rtk as custom Nix derivation
Build rtk from source (not yet in nixpkgs) using rustPlatform.buildRustPackage. Custom derivations extracted to pkgs/ for single responsibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
let
|
||||
atomicptr = import (fetchTarball
|
||||
"https://github.com/atomicptr/nix/archive/refs/heads/master.tar.gz") { };
|
||||
rtk = pkgs.callPackage ./pkgs/rtk.nix { };
|
||||
in {
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
@@ -127,7 +128,7 @@ in {
|
||||
playerctl
|
||||
numlockx
|
||||
|
||||
nixfmt-classic
|
||||
nixfmt
|
||||
nodejs_22
|
||||
fnm
|
||||
bun
|
||||
@@ -162,6 +163,8 @@ in {
|
||||
shfmt
|
||||
toilet
|
||||
|
||||
rtk
|
||||
|
||||
# AI
|
||||
ollama
|
||||
whisper-cpp # STT local
|
||||
|
||||
15
pkgs/rtk.nix
Normal file
15
pkgs/rtk.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ rustPlatform, fetchFromGitHub, pkg-config, sqlite, lib }:
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "rtk";
|
||||
version = "0.22.2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "rtk-ai";
|
||||
repo = "rtk";
|
||||
rev = "5b597002dcd99029cb9c0da9b6d38b44021bdb3a";
|
||||
hash = "sha256-a/+5w1cU/sSGsIdu/9QT1lJlURF669FxMcTiR81makE=";
|
||||
};
|
||||
cargoHash = "sha256-lgmgorgT/KDSyzEcE33qkPF4f/3LJbAzEH0s9thTohE=";
|
||||
doCheck = false; # tests require filesystem access (blocked by Nix sandbox)
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ sqlite ];
|
||||
}
|
||||
Reference in New Issue
Block a user