attempt to get nix working

pull/8675/merge^2
Matt Paras 2025-05-10 11:53:35 -07:00
parent 85f99f8d5a
commit 0b5741fa84
3 changed files with 23 additions and 6 deletions

View File

@ -1,5 +1,20 @@
{ {
"nodes": { "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -36,6 +51,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"crane": "crane",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"

View File

@ -69,20 +69,21 @@
filter = ignorePaths; filter = ignorePaths;
}; };
helix-cogs = craneLibStable.buildPackage (commonArgs // { helix-cogs = craneLibStable.buildPackage (commonArgs // {
pname = "helix-cogs"; pname = "helix-cogs";
version = "0.1.0"; version = "0.1.0";
cargoArtifacts = craneLibStable.buildDepsOnly commonArgs; # cargoArtifacts = craneLibStable.buildDepsOnly commonArgs;
buildPhase = '' buildPhase = ''
export HOME=$PWD/build_home # code-gen will write files relative to $HOME export HOME=$PWD/build_home # code-gen will write files relative to $HOME
cargoBuildLog=$(mktemp cargoBuildLogXXXX.json) mkdir -p $HOME
cargo run --package xtask -- code-gen --message-format json-render-diagnostics >"$cargoBuildLog" cargo run --package xtask -- code-gen
''; '';
postInstall = '' installPhase = ''
mkdir -p $out/cogs mkdir -p $out/cogs
cp -r build_home/.config/helix/* "$out/cogs" cp -r build_home/.steel/cogs/helix/* "$out/cogs"
''; '';
}); });

View File

@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "1.81.0" channel = "1.82.0"
components = ["rustfmt", "rust-src", "clippy"] components = ["rustfmt", "rust-src", "clippy"]