File tree Expand file tree Collapse file tree 3 files changed +35
-13
lines changed Expand file tree Collapse file tree 3 files changed +35
-13
lines changed Original file line number Diff line number Diff line change 1- { inputs , self , ... } :
1+ {
2+ inputs ,
3+ self ,
4+ lib ,
5+ ...
6+ } :
27{
38 perSystem =
49 { system , pkgs , ... } :
510 {
611 _module . args = {
7- makeNixvimWithModule = import ../wrappers/standalone.nix pkgs self ;
12+ makeNixvimWithModule = import ../wrappers/standalone.nix {
13+ inherit lib self ;
14+ defaultSystem = system ;
15+ } ;
816 } ;
917
1018 checks =
Original file line number Diff line number Diff line change 1818 ] ;
1919
2020 perSystem =
21- { pkgs , system , ... } :
21+ { system , ... } :
2222 let
2323 nixvimLib = nixvim . lib . ${ system } ;
2424 nixvim' = nixvim . legacyPackages . ${ system } ;
2525 nixvimModule = {
26- inherit pkgs ;
26+ inherit system ; # or alternatively, set `pkgs`
2727 module = import ./config ; # import the module directly
2828 # You can use `extraSpecialArgs` to pass additional arguments to your module files
2929 extraSpecialArgs = {
Original file line number Diff line number Diff line change 1- default_pkgs : self :
1+ {
2+ self ,
3+ lib ,
4+ defaultSystem ,
5+ } :
26{
37 # TODO: Deprecate this arg in favour of using module options
4- pkgs ? default_pkgs ,
5- lib ? pkgs . lib ,
8+ pkgs ? null ,
9+ # NOTE: `defaultSystem` is the only reason this function can't go in `<nixvim>.lib`
10+ system ? defaultSystem ,
611 extraSpecialArgs ? { } ,
712 _nixvimTests ? false ,
813 module ,
1217 helpers = self . lib . nixvim . override { inherit _nixvimTests ; } ;
1318 inherit ( helpers . modules ) evalNixvim ;
1419
20+ systemMod =
21+ if pkgs == null then
22+ {
23+ _file = ./standalone.nix ;
24+ nixpkgs . hostPlatform = lib . mkDefault { inherit system ; } ;
25+ }
26+ else
27+ {
28+ _file = ./standalone.nix ;
29+ nixpkgs . pkgs = lib . mkDefault pkgs ;
30+ } ;
31+
1532 mkNvim =
1633 mod :
1734 let
1835 nixvimConfig = evalNixvim {
1936 modules = [
2037 mod
21- # TODO: only include this when `args?pkgs`:
22- {
23- _file = ./standalone.nix ;
24- nixpkgs . pkgs = lib . mkDefault pkgs ;
25- }
38+ systemMod
2639 ] ;
2740 inherit extraSpecialArgs ;
2841 } ;
2942 inherit ( nixvimConfig . config ) enableMan build ;
43+ inherit ( nixvimConfig . _module . args . pkgs ) symlinkJoin ;
3044 in
31- ( pkgs . symlinkJoin {
45+ ( symlinkJoin {
3246 name = "nixvim" ;
3347 paths = [
3448 build . package
You can’t perform that action at this time.
0 commit comments