feat: add helix language configuration
This commit is contained in:
parent
51173860be
commit
035acb614f
59
flake.lock
generated
59
flake.lock
generated
@ -18,7 +18,42 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"helix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1784219418,
|
||||
"narHash": "sha256-yfNBfV6HWAQU/xZXwrFoedsSYsDmCDIlTHRxAZI6teY=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "f6f3eb1fe4a73933466f30175843059a4381a985",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1775036866,
|
||||
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1784120854,
|
||||
"narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=",
|
||||
@ -37,7 +72,29 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"helix": "helix",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"helix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775358767,
|
||||
"narHash": "sha256-f2eC+WIfhjevCPQILuV08i/kmKZzYZpUvkom/33VxCA=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "20fd44bc663daa53a2575e01293e24e681d62244",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
||||
27
flake.nix
27
flake.nix
@ -2,6 +2,7 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
helix.url = "github:helix-editor/helix";
|
||||
};
|
||||
|
||||
outputs =
|
||||
@ -9,6 +10,7 @@
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
helix,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
@ -19,6 +21,31 @@
|
||||
};
|
||||
in
|
||||
rec {
|
||||
packages.syntax =
|
||||
let
|
||||
grammars = pkgs.callPackage "${helix}/grammars.nix" { };
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "syntax";
|
||||
phases = [
|
||||
"buildPhase"
|
||||
"installPhase"
|
||||
];
|
||||
buildPhase = ''
|
||||
cp -r ${helix}/runtime/queries/* ./
|
||||
chmod u+w ./* -R
|
||||
for so in ${grammars}/*.so; do
|
||||
name=$(basename "$so" .so)
|
||||
if [ -d "./$name" ]; then
|
||||
cp "$so" "./$name/$name.so"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r ./* $out/
|
||||
'';
|
||||
};
|
||||
packages.karnaugh = pkgs.rustPlatform.buildRustPackage (final: {
|
||||
pname = "karnaugh";
|
||||
version = "0.1.5";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user