hms: make `defaultManualPath` into callPackage arg
This commit is contained in:
parent
3e2697ca4d
commit
36b5f5e5f7
|
@ -39,6 +39,9 @@
|
||||||
pkgs.callPackage ./searchers/home-manager-search.nix {
|
pkgs.callPackage ./searchers/home-manager-search.nix {
|
||||||
inherit home-manager;
|
inherit home-manager;
|
||||||
inherit (self.packages.${system}) json2nix;
|
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 {
|
nix-option-search = pkgs.callPackage ./searchers/nix-option-search.nix {
|
||||||
inherit nixpkgs;
|
inherit nixpkgs;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, home-manager, system, json2nix, ... }:
|
{ pkgs, lib, home-manager, defaultManualPath, system, json2nix, ... }:
|
||||||
let
|
let
|
||||||
usage = pkgs.writeText "home-manager-search-usage" ''
|
usage = pkgs.writeText "home-manager-search-usage" ''
|
||||||
Usage:
|
Usage:
|
||||||
|
@ -106,10 +106,6 @@ let
|
||||||
echo $JSON_DATA | ${gomplate} --datasource opt=stdin:?type=application/json --file ${template}
|
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" ''
|
in pkgs.writers.writeBash "search-home-manager-attrs" ''
|
||||||
JSON_MANUAL_PATH="${defaultManualPath}"
|
JSON_MANUAL_PATH="${defaultManualPath}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue