mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 01:08:43 +02:00
misc: refactor helpers propagation
Co-authored-by: Robert Hensing <robert@roberthensing.nl>
This commit is contained in:
parent
3bbb3d5453
commit
5d3ed3a09e
12 changed files with 100 additions and 40 deletions
|
@ -1,6 +1,7 @@
|
|||
{inputs, ...}: {
|
||||
imports = [
|
||||
./dev.nix
|
||||
./helpers.nix
|
||||
./lib.nix
|
||||
./legacy-packages.nix
|
||||
./modules.nix
|
||||
|
|
15
flake-modules/helpers.nix
Normal file
15
flake-modules/helpers.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{getHelpers, ...}: {
|
||||
_module.args.getHelpers = pkgs:
|
||||
import ../lib/helpers.nix {
|
||||
inherit pkgs;
|
||||
inherit (pkgs) lib;
|
||||
};
|
||||
|
||||
perSystem = {
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
_module.args.helpers = getHelpers pkgs;
|
||||
};
|
||||
}
|
|
@ -10,7 +10,6 @@
|
|||
_module.args = {
|
||||
pkgs = pkgs.lib.mkForce pkgs;
|
||||
inherit (pkgs) lib;
|
||||
helpers = import ../lib/helpers.nix {inherit (pkgs) lib;};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
pkgs,
|
||||
config,
|
||||
rawModules,
|
||||
helpers,
|
||||
...
|
||||
}: {
|
||||
packages = import ../docs {
|
||||
inherit rawModules pkgs;
|
||||
inherit rawModules pkgs helpers;
|
||||
};
|
||||
|
||||
# Test that all packages build fine when running `nix flake check`.
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{
|
||||
inputs,
|
||||
modules,
|
||||
getHelpers,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
wrapperArgs = {
|
||||
inherit modules;
|
||||
inherit self;
|
||||
inherit getHelpers;
|
||||
};
|
||||
in {
|
||||
perSystem = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue