Reformat nix source file using nixfmt
This commit is contained in:
parent
2e4a532958
commit
9201969c1b
220 changed files with 3169 additions and 2487 deletions
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue