install zeal docs for packages like mx-sanebot

This commit is contained in:
Colin 2023-04-27 10:07:16 +00:00
parent ec7f36913c
commit fd82256bbc
4 changed files with 27 additions and 8 deletions

View File

@ -19,6 +19,7 @@
"desktopGuiApps"
"stepmania"
];
sane.programs.mx-sanebot.enableFor.system = true; # for the docs
sops.secrets.colin-passwd = {
sopsFile = ../../../secrets/lappy.yaml;

View File

@ -242,6 +242,7 @@ let
# packages not part of any package set
otherPkgs = {
inherit (pkgs)
mx-sanebot
stepmania
;
};
@ -270,6 +271,7 @@ in
./sublime-music.nix
./vlc.nix
./web-browser.nix
./zeal.nix
./zsh
];
@ -403,11 +405,6 @@ in
yarn.persist.plaintext = [ ".cache/yarn" ];
zeal-qt5.persist.plaintext = [
".cache/Zeal"
".local/share/Zeal"
];
# zcash coins. safe to delete, just slow to regenerate (10-60 minutes)
zecwallet-lite.persist.private = [ ".zcash" ];
}

View File

@ -0,0 +1,16 @@
{ config, lib, sane-lib, ... }:
let
inherit (lib) mkIf;
in {
sane.programs.zeal-qt5 = {
persist.plaintext = [
".cache/Zeal"
".local/share/Zeal"
];
fs.".local/share/Zeal/Zeal/system" = sane-lib.fs.wantedSymlinkTo "/run/current-system/sw/share/docset";
};
environment.pathsToLink = mkIf config.sane.programs.zeal-qt5.enabled [
"/share/docset"
];
}

View File

@ -14,9 +14,14 @@ rustPlatform.buildRustPackage {
nativeBuildInputs = [ pkg-config ] ++ lib.optional (cargo-docset != null) cargo-docset;
buildInputs = [ openssl ];
# to build dash/zeal docs:
# `cargo-docset`
# `cp -r -rcp target/docset/mx-sanebot.docset ~/.local/share/Zeal/Zeal/docsets/`
postBuild = ''
cargo-docset docset
'';
postInstall = ''
mkdir -p $out/share/docset
cp -R target/docset/* $out/share/docset/
'';
# enables debug builds, if we want: https://github.com/NixOS/nixpkgs/issues/60919.
hardeningDisable = [ "fortify" ];