2022-11-24 20:04:52 +01:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-22.11";
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-22.11";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, home-manager }:
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in {
|
|
|
|
apps.${system} = let
|
|
|
|
toApp = _: pkg: {
|
|
|
|
type = "app";
|
|
|
|
program = toString pkg;
|
|
|
|
};
|
2022-11-26 05:14:14 +01:00
|
|
|
in builtins.mapAttrs toApp {
|
|
|
|
inherit (self.packages.${system})
|
2022-11-29 16:18:05 +01:00
|
|
|
home-manager-search nix-option-search nix-package-search;
|
|
|
|
} // {
|
|
|
|
nix2json = {
|
|
|
|
type = "app";
|
|
|
|
program = "${self.packages.${system}.nix2json}/bin/nix2json";
|
|
|
|
};
|
2022-11-29 23:16:52 +01:00
|
|
|
docbook2txt = {
|
2022-11-29 16:18:05 +01:00
|
|
|
type = "app";
|
2022-11-29 23:16:52 +01:00
|
|
|
program = "${self.packages.${system}.docbook2txt}/bin/docbook2txt";
|
2022-11-29 16:18:05 +01:00
|
|
|
};
|
2022-11-26 05:14:14 +01:00
|
|
|
};
|
|
|
|
|
2022-11-24 20:04:52 +01:00
|
|
|
hydraJobs = with pkgs.lib;
|
|
|
|
mapAttrs' (name: value: nameValuePair name { ${system} = value; })
|
|
|
|
self.packages.${system};
|
|
|
|
|
|
|
|
packages.${system} = {
|
2022-11-26 05:14:14 +01:00
|
|
|
# Applications
|
2022-11-24 20:04:52 +01:00
|
|
|
home-manager-search =
|
2022-11-26 05:14:14 +01:00
|
|
|
pkgs.callPackage ./searchers/home-manager-search.nix {
|
|
|
|
inherit home-manager;
|
2022-11-29 23:16:52 +01:00
|
|
|
inherit (self.packages.${system}) json2nix docbook2txt;
|
2022-11-26 06:02:19 +01:00
|
|
|
defaultManualPath =
|
|
|
|
let pkg = self.packages.${system}.home-manager-json;
|
|
|
|
in "${pkg}/share/doc/home-manager/options.json";
|
2022-11-26 05:14:14 +01:00
|
|
|
};
|
|
|
|
nix-option-search = pkgs.callPackage ./searchers/nix-option-search.nix {
|
|
|
|
inherit nixpkgs;
|
2022-11-29 23:16:52 +01:00
|
|
|
inherit (self.packages.${system}) json2nix docbook2txt;
|
2022-11-26 06:35:58 +01:00
|
|
|
defaultManualPath =
|
|
|
|
let pkg = self.packages.${system}.nix-options-json;
|
|
|
|
in "${pkg}/share/doc/nixos/options.json";
|
2022-11-26 05:14:14 +01:00
|
|
|
};
|
|
|
|
nix-package-search =
|
|
|
|
pkgs.callPackage ./searchers/nix-package-search.nix { };
|
|
|
|
nix-lib-search = pkgs.callPackage ./searchers/nix-lib-search.nix { };
|
|
|
|
nur-package-search =
|
|
|
|
pkgs.callPackage ./searchers/nur-package-search.nix { };
|
|
|
|
|
|
|
|
# Data sources
|
|
|
|
home-manager-json = home-manager.packages.${system}.docs-json;
|
|
|
|
nix-options-json =
|
|
|
|
(import "${nixpkgs}/nixos/release.nix" { inherit nixpkgs; }).options;
|
|
|
|
# nix-packages-json = pkgs.emptyFile;
|
|
|
|
|
|
|
|
# Internal Tools
|
2022-11-29 15:31:48 +01:00
|
|
|
json2nix =
|
|
|
|
pkgs.callPackage ./internals/json2nix { compiler = "ghc924"; };
|
2022-11-29 23:16:52 +01:00
|
|
|
docbook2txt =
|
|
|
|
pkgs.callPackage ./internals/docbook2txt { compiler = "ghc924"; };
|
2022-11-24 20:04:52 +01:00
|
|
|
};
|
|
|
|
|
2022-11-26 05:14:14 +01:00
|
|
|
overlays.default = _: prev: prev // self.packages.${system};
|
2022-11-24 20:04:52 +01:00
|
|
|
|
2022-11-26 05:14:14 +01:00
|
|
|
devShells.${system}.default = pkgs.callPackage ./shell.nix { };
|
2022-11-24 20:04:52 +01:00
|
|
|
};
|
|
|
|
}
|