From b1abe8a0715871348df8e7d339d6bea77091dbd8 Mon Sep 17 00:00:00 2001 From: Kosumi Date: Tue, 4 Nov 2025 16:23:58 -0500 Subject: [PATCH] Fix code-rs Nix packaging --- code-rs/default.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code-rs/default.nix b/code-rs/default.nix index 3fb6ff1bcc..3a3e52864f 100644 --- a/code-rs/default.nix +++ b/code-rs/default.nix @@ -9,9 +9,22 @@ rec { inherit env; pname = "code-rs"; version = "0.1.0"; - cargoLock.lockFile = ./Cargo.lock; + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "ratatui-0.29.0" = "sha256-HBvT5c8GsiCxMffNjJGLmHnvG77A6cqEL+1ARurBXho="; + }; + }; + doCheck = false; - src = ./.; + # Cargo toml depends on ../codex-rs + src = ../.; + + # 2. Tell the builder to cd into this package's directory before building + # baseNameOf ./. automatically gets the name of the current directory + # (e.g., "code-rs") + sourceRoot = "${baseNameOf ../.}/${baseNameOf ./.}"; + nativeBuildInputs = with pkgs; [ pkg-config openssl