hms: make `defaultManualPath` into callPackage arg

This commit is contained in:
Oystein Kristoffer Tveit 2022-11-26 06:02:19 +01:00
parent 3e2697ca4d
commit 36b5f5e5f7
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 4 additions and 5 deletions

View File

@ -39,6 +39,9 @@
pkgs.callPackage ./searchers/home-manager-search.nix {
inherit home-manager;
inherit (self.packages.${system}) json2nix;
defaultManualPath =
let pkg = self.packages.${system}.home-manager-json;
in "${pkg}/share/doc/home-manager/options.json";
};
nix-option-search = pkgs.callPackage ./searchers/nix-option-search.nix {
inherit nixpkgs;

View File

@ -1,4 +1,4 @@
{ pkgs, lib, home-manager, system, json2nix, ... }:
{ pkgs, lib, home-manager, defaultManualPath, system, json2nix, ... }:
let
usage = pkgs.writeText "home-manager-search-usage" ''
Usage:
@ -106,10 +106,6 @@ let
echo $JSON_DATA | ${gomplate} --datasource opt=stdin:?type=application/json --file ${template}
'';
defaultManualPath = "${
home-manager.packages.${system}.docs-json
}/share/doc/home-manager/options.json";
in pkgs.writers.writeBash "search-home-manager-attrs" ''
JSON_MANUAL_PATH="${defaultManualPath}"