@ -74,6 +74,25 @@
# filter out unnecessary paths
# filter out unnecessary paths
filter = ignorePaths ;
filter = ignorePaths ;
} ;
} ;
helix-cogs = craneLibStable . buildPackage ( commonArgs // {
pname = " h e l i x - c o g s " ;
version = " 0 . 1 . 0 " ;
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 > " $ c a r g o B u i l d L o g "
'' ;
postInstall = ''
mkdir - p $ out/cogs
cp - r build_home/.config/helix /* " $ o u t / c o g s "
'' ;
} ) ;
makeOverridableHelix = old : config : let
makeOverridableHelix = old : config : let
grammars = pkgs . callPackage ./grammars.nix config ;
grammars = pkgs . callPackage ./grammars.nix config ;
runtimeDir = pkgs . runCommand " h e l i x - r u n t i m e " { } ''
runtimeDir = pkgs . runCommand " h e l i x - r u n t i m e " { } ''
@ -144,6 +163,7 @@
'' ;
'' ;
} ) ;
} ) ;
helix = makeOverridableHelix self . packages . ${ system } . helix-unwrapped { } ;
helix = makeOverridableHelix self . packages . ${ system } . helix-unwrapped { } ;
helix-cogs = helix-cogs ;
default = self . packages . ${ system } . helix ;
default = self . packages . ${ system } . helix ;
} ;
} ;