Skip to content

Commit

Permalink
ci: fix flake checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jul 18, 2024
1 parent 6bc1576 commit 143cf07
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 37 deletions.
23 changes: 12 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,24 +117,25 @@
};
};

devShell = pkgs.mkShell {
devShell = pkgs.nvim-nightly-test.overrideAttrs (oa: {
name = "neotest-haskell devShell";
shellHook = ''
${pre-commit-check.shellHook}
ln -fs ${pkgs.luarc-to-json luarc-nightly} .luarc.json
export NEOTEST_HASKELL_DEV_DIR=${pkgs.neotest-haskell-dev}
export TREE_SITTER_HASKELL_DIR=${pkgs.tree-sitter-haskell-plugin}
# FIXME: Needed by neotest
export PLENARY_DIR=${pkgs.vimPlugins.plenary-nvim}
'';
buildInputs =
(with pkgs; [
zlib
])
++ (with git-hooks.packages.${system}; [
alejandra
self.checks.${system}.pre-commit-check.enabledPackages
++ (with pkgs; [
lua-language-server
stylua
editorconfig-checker
markdownlint-cli
]);
};
])
++ oa.buildInputs
++ oa.propagatedBuildInputs;
doCheck = false;
});

docgen = pkgs.callPackage ./nix/docgen.nix {};
in {
Expand Down
2 changes: 2 additions & 0 deletions nix/ci-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# These have to be on the rtp for queries to work
export NEOTEST_HASKELL_DEV_DIR=${final.neotest-haskell-dev}
export TREE_SITTER_HASKELL_DIR=${tree-sitter-haskell-plugin}
export PLENARY_DIR=${final.vimPlugins.plenary-nvim}
'';
};
in {
Expand All @@ -37,4 +38,5 @@ in {
name = "nvim-nightly-test";
nvim = final.neovim-nightly;
};
inherit tree-sitter-haskell-plugin;
}
26 changes: 0 additions & 26 deletions nix/nvim-plugin-overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,6 @@
propagatedBuildInputs = [luarocks-build-treesitter-parser];
}) {};

neotest = luaself.callPackage ({
buildLuarocksPackage,
fetchurl,
fetchzip,
lua,
luaOlder,
nvim-nio,
plenary-nvim,
}:
buildLuarocksPackage {
pname = "neotest";
version = "5.2.3-1";
knownRockspec =
(fetchurl {
url = "mirror://luarocks/neotest-5.2.3-1.rockspec";
sha256 = "16pwkwv2dmi9aqhp6bdbgwhksi891iz73rvksqmv136jx6fi7za1";
})
.outPath;
src = fetchzip {
url = "https://github.com/nvim-neotest/neotest/archive/5caac5cc235d495a2382bc2980630ef36ac87032.zip";
sha256 = "1i1d6m17wf3p76nm75jk4ayd4zyhslmqi2pc7j8qx87391mnz2c4";
};
disabled = luaOlder "5.1";
propagatedBuildInputs = [lua nvim-nio plenary-nvim];
}) {};

neotest-haskell = luaself.callPackage ({
buildLuarocksPackage,
fetchurl,
Expand Down
2 changes: 2 additions & 0 deletions spec/hspec_spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
vim.env.PLENARY_TEST_TIMEOUT = 60000
vim.opt.runtimepath:append(vim.env.NEOTEST_HASKELL_DEV_DIR)
vim.opt.runtimepath:append(vim.env.TREE_SITTER_HASKELL_DIR)
vim.opt.runtimepath:append(vim.env.PLENARY_DIR)

local compat = require('neotest-haskell.compat')
local hspec = require('neotest-haskell.hspec')
Expand Down
1 change: 1 addition & 0 deletions spec/runner_spec.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vim.env.PLENARY_TEST_TIMEOUT = 60000
local runner = require('neotest-haskell.runner')
local async = require('nio').tests

Expand Down
2 changes: 2 additions & 0 deletions spec/sydtest_spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
vim.env.PLENARY_TEST_TIMEOUT = 60000
vim.opt.runtimepath:append(vim.env.NEOTEST_HASKELL_DEV_DIR)
vim.opt.runtimepath:append(vim.env.TREE_SITTER_HASKELL_DIR)
vim.opt.runtimepath:append(vim.env.PLENARY_DIR)

local sydtest = require('neotest-haskell.sydtest')
local compat = require('neotest-haskell.compat')
Expand Down
2 changes: 2 additions & 0 deletions spec/tasty_spec.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
vim.env.PLENARY_TEST_TIMEOUT = 60000
vim.opt.runtimepath:append(vim.env.NEOTEST_HASKELL_DEV_DIR)
vim.opt.runtimepath:append(vim.env.TREE_SITTER_HASKELL_DIR)
vim.opt.runtimepath:append(vim.env.PLENARY_DIR)

local tasty = require('neotest-haskell.tasty')
local compat = require('neotest-haskell.compat')
Expand Down

0 comments on commit 143cf07

Please sign in to comment.