Reformat nix source file using nixfmt

This commit is contained in:
ulic-youthlic 2025-07-13 06:04:55 +08:00
parent 2e4a532958
commit 9201969c1b
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
220 changed files with 3169 additions and 2487 deletions

View file

@ -5,36 +5,31 @@
symlinkJoin,
makeWrapper,
lib,
}: let
}:
let
inherit (inputs.helix.packages."${system}") helix;
helixWithPassthru =
helix
// {
passthru =
helix.passthru
// {
languages = lib.pipe "${helix.src}/languages.toml" [
builtins.readFile
builtins.fromTOML
];
};
helixWithPassthru = helix // {
passthru = helix.passthru // {
languages = lib.pipe "${helix.src}/languages.toml" [
builtins.readFile
builtins.fromTOML
];
};
runtime = callPackage ./runtime.nix {};
};
runtime = callPackage ./runtime.nix { };
in
symlinkJoin {
name = "helix-wrapped";
paths = [helixWithPassthru];
inherit (helixWithPassthru) meta;
buildInputs = [
makeWrapper
];
postBuild = ''
wrapProgram $out/bin/hx \
--set HELIX_RUNTIME ${runtime}
'';
passthru =
helixWithPassthru.passthru
// {
helix-unwrapped = helixWithPassthru;
};
}
symlinkJoin {
name = "helix-wrapped";
paths = [ helixWithPassthru ];
inherit (helixWithPassthru) meta;
buildInputs = [
makeWrapper
];
postBuild = ''
wrapProgram $out/bin/hx \
--set HELIX_RUNTIME ${runtime}
'';
passthru = helixWithPassthru.passthru // {
helix-unwrapped = helixWithPassthru;
};
}

View file

@ -3,8 +3,10 @@
srcs,
stdenv,
runCommandNoCCLocal,
}: let
buildGrammar = grammar:
}:
let
buildGrammar =
grammar:
stdenv.mkDerivation {
pname = "helix-tree-sitter-${grammar.name}";
version = grammar.version;
@ -78,20 +80,20 @@
}
)
|> lib.mapAttrsToList (_: value: "ln -s ${value.value}/${value.name}.so $out/${value.name}.so");
grammarDir = runCommandNoCCLocal "helix-grammars" {} ''
grammarDir = runCommandNoCCLocal "helix-grammars" { } ''
mkdir -p $out
${builtins.concatStringsSep "\n" grammarLinks}
'';
queryDir = runCommandNoCCLocal "helix-query" {} ''
queryDir = runCommandNoCCLocal "helix-query" { } ''
mkdir -p $out
${builtins.concatStringsSep "\n" queries}
'';
in
runCommandNoCCLocal "helix-runtime" {} ''
mkdir -p $out
runCommandNoCCLocal "helix-runtime" { } ''
mkdir -p $out
ln -s ${grammarDir} $out/grammars
ln -s ${queryDir} $out/queries
''
ln -s ${grammarDir} $out/grammars
ln -s ${queryDir} $out/queries
''