Skip to content

Commit

Permalink
Add Nix Flake
Browse files Browse the repository at this point in the history
This PR contains Nix flakes with:

quick-lint-js cli,
quick-lint-js vimPlugin,
neovim that has quick-lint-js both plugin and cli ready to work

Co-authored-by: strager <strager.nds@gmail.com>
  • Loading branch information
countoren and strager authored May 1, 2023
1 parent 926468a commit f05ef2e
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
59 changes: 59 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
inputs.flake-utils.url = github:numtide/flake-utils;
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem flake-utils.lib.defaultSystems (system:
let pkgs = nixpkgs.legacyPackages.${system};
in rec {
# Runs with nix build .#quick-lint-js
packages.quick-lint-js = pkgs.callPackage ./dist/nix/quick-lint-js.nix { };
packages.vimPlugin = pkgs.vimUtils.buildVimPlugin {
name = "quick-lint-js";
src = plugin/vim/quick-lint-js.vim;
meta = packages.quick-lint-js.meta;
};

packages.simple-neovim-with-qljs = pkgs.neovim.override {
configure = {
customRC = ''
let $PATH = $PATH.":${packages.quick-lint-js}/bin"
'';
packages.myPackages = {
start = with pkgs.vimPlugins;[
# loaded on launch
ale
packages.vimPlugin
];
# manually loadable by calling `:packadd $plugin-name`
opt = [ ];
};
};
};
# Runs with nix build
packages.default = packages.quick-lint-js;

});
}

0 comments on commit f05ef2e

Please sign in to comment.