mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
This represents a major rearchitecture for nixvim, so I'm leaving this up to track the progress for now, and to serve as a reference for any breaking changes during transition. The main change is, of course, being able to use nixvim standalone. To do this, you should use the new build function, which takes in two arguments: the system architecture (e.g. x86_64-linux) and the configuration. For the new configuration, do not use the programs.nixvim. prefix. For module development, the main change is that you should no longer prefix your modules with programs.nixvim..
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{ pkgs ? import <nixpkgs> { }
|
|
, lib ? import <nixpkgs/lib>
|
|
, nmdSrc
|
|
, nixvimModules ? [ ]
|
|
, ...
|
|
}:
|
|
let
|
|
nmd = import nmdSrc { inherit pkgs lib; };
|
|
scrubbedPkgsModule = {
|
|
imports = [{
|
|
_module.args = {
|
|
pkgs = lib.mkForce (nmd.scrubDerivations "pkgs" pkgs);
|
|
pkgs_i686 = lib.mkForce { };
|
|
};
|
|
}];
|
|
};
|
|
buildModulesDocs = args:
|
|
nmd.buildModulesDocs ({
|
|
moduleRootPaths = [ ./.. ];
|
|
mkModuleUrl = path:
|
|
"https://github.com/pta2002/nixvim/blob/main/${path}#blob-path";
|
|
channelName = "nixvim";
|
|
} // args);
|
|
nixvimDocs = buildModulesDocs {
|
|
modules = [
|
|
scrubbedPkgsModule
|
|
] ++ nixvimModules;
|
|
docBook.id = "nixvim-options";
|
|
};
|
|
|
|
docs = nmd.buildDocBookDocs {
|
|
pathName = "";
|
|
modulesDocs = [ nixvimDocs ];
|
|
documentsDirectory = ./.;
|
|
documentType = "book";
|
|
chunkToc = ''
|
|
<toc>
|
|
<d:tocentry xmlns:d="http://docbook.org/ns/docbook" linkend="book-nixvim-manual"><?dbhtml filename="index.html"?>
|
|
<d:tocentry linkend="ch-options"><?dbhtml filename="options.html"?></d:tocentry>
|
|
<d:tocentry linkend="ch-release-notes"><?dbhtml filename="release-notes.html"?></d:tocentry>
|
|
</d:tocentry>
|
|
</toc>
|
|
'';
|
|
};
|
|
in
|
|
# TODO: Parse this json or something, since docbook isn't working (and it's kind of terrible anyway)
|
|
nixvimDocs.json
|
|
|