diff --git a/flake.lock b/flake.lock index 7e3d5bd3c..40c36484f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "crane": { + "locked": { + "lastModified": 1746291859, + "narHash": "sha256-DdWJLA+D5tcmrRSg5Y7tp/qWaD05ATI4Z7h22gd1h7Q=", + "owner": "ipetkov", + "repo": "crane", + "rev": "dfd9a8dfd09db9aad544c4d3b6c47b12562544a5", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -36,6 +51,7 @@ }, "root": { "inputs": { + "crane": "crane", "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" diff --git a/flake.nix b/flake.nix index cd5b20f06..420d0a175 100644 --- a/flake.nix +++ b/flake.nix @@ -69,20 +69,21 @@ filter = ignorePaths; }; + helix-cogs = craneLibStable.buildPackage (commonArgs // { pname = "helix-cogs"; version = "0.1.0"; - cargoArtifacts = craneLibStable.buildDepsOnly commonArgs; + # cargoArtifacts = craneLibStable.buildDepsOnly commonArgs; buildPhase = '' export HOME=$PWD/build_home # code-gen will write files relative to $HOME - cargoBuildLog=$(mktemp cargoBuildLogXXXX.json) - cargo run --package xtask -- code-gen --message-format json-render-diagnostics >"$cargoBuildLog" + mkdir -p $HOME + cargo run --package xtask -- code-gen ''; - postInstall = '' + installPhase = '' mkdir -p $out/cogs - cp -r build_home/.config/helix/* "$out/cogs" + cp -r build_home/.steel/cogs/helix/* "$out/cogs" ''; }); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 2d52d6a4b..74c6fc7a2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.81.0" +channel = "1.82.0" components = ["rustfmt", "rust-src", "clippy"]