nvf/flake/packages.nix

72 lines
1.8 KiB
Nix
Raw Permalink Normal View History

2023-02-10 17:40:13 +00:00
{inputs, ...}: {
perSystem = {
config,
2023-02-10 17:50:20 +00:00
pkgs,
lib,
2023-02-10 17:40:13 +00:00
...
2023-03-31 02:26:46 +00:00
}: let
docs = import ../docs {inherit pkgs inputs lib;};
2023-03-31 02:26:46 +00:00
in {
2024-05-06 19:30:06 +00:00
packages = {
inherit (docs.manual) htmlOpenTool;
2024-05-06 19:30:06 +00:00
# Documentation
docs = docs.manual.html;
docs-html = docs.manual.html;
docs-manpages = docs.manPages;
docs-json = docs.options.json;
docs-linkcheck = let
site = config.packages.docs;
in
pkgs.testers.lycheeLinkCheck {
inherit site;
remap = {
"https://notashelf.github.io/nvf/" = site;
};
extraConfig = {
exclude = [];
include_mail = true;
include_verbatim = true;
};
};
2023-02-10 17:40:13 +00:00
2024-05-06 19:30:06 +00:00
# Build and open the built manual in your system browser
docs-html-wrapped = pkgs.writeScriptBin "docs-html-wrapped" ''
#!${pkgs.stdenv.shell}
# use xdg-open to open the docs in the browser
${pkgs.xdg-utils}/bin/xdg-open ${docs.manual.html}
2024-05-06 19:30:06 +00:00
'';
2023-10-03 19:08:02 +00:00
2024-05-06 19:30:06 +00:00
# Exposed neovim configurations
nix = config.legacyPackages.neovim-nix;
maximal = config.legacyPackages.neovim-maximal;
default = config.legacyPackages.neovim-nix;
2023-10-20 13:28:35 +00:00
2024-05-06 19:30:06 +00:00
# Published docker images
docker-nix = let
inherit (pkgs) bash gitFull buildEnv;
2024-05-06 19:30:06 +00:00
inherit (config.legacyPackages) neovim-nix;
in
pkgs.dockerTools.buildImage {
2024-05-06 19:30:06 +00:00
name = "nvf";
tag = "latest";
2023-10-20 13:28:35 +00:00
2024-05-06 19:30:06 +00:00
copyToRoot = buildEnv {
name = "neovim-root";
pathsToLink = ["/bin"];
paths = [
neovim-nix
gitFull
bash
];
};
2023-10-20 13:28:35 +00:00
2024-05-06 19:30:06 +00:00
config = {
Cmd = ["${neovim-nix}/bin/nvim"];
WorkingDir = "/home/neovim/demo";
Volumes = {"/home/neovim/demo" = {};};
2023-10-20 13:28:35 +00:00
};
2024-05-06 19:30:06 +00:00
};
};
2023-02-10 17:40:13 +00:00
};
}