2020-06-18 22:41:01 +00:00
|
|
|
{
|
|
|
|
description = "Code behind search.nixos.org";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs = { url = "nixpkgs/nixos-unstable"; };
|
|
|
|
};
|
|
|
|
|
2021-08-26 07:41:39 +00:00
|
|
|
outputs = { self, nixpkgs }:
|
2020-06-18 22:41:01 +00:00
|
|
|
let
|
|
|
|
systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ];
|
|
|
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
2020-08-28 12:25:38 +00:00
|
|
|
mkPackage = path: system:
|
2020-06-18 22:41:01 +00:00
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
2021-11-23 12:58:38 +00:00
|
|
|
overlays = [];
|
2020-06-18 22:41:01 +00:00
|
|
|
};
|
|
|
|
in
|
2020-08-28 12:25:38 +00:00
|
|
|
import path { inherit pkgs; };
|
|
|
|
packages = system:
|
2020-06-18 22:41:01 +00:00
|
|
|
{
|
2021-08-17 08:55:08 +00:00
|
|
|
flake_info = mkPackage ./flake-info system;
|
2020-08-28 12:25:38 +00:00
|
|
|
frontend = mkPackage ./. system;
|
2020-06-18 22:41:01 +00:00
|
|
|
};
|
2021-08-17 08:55:08 +00:00
|
|
|
|
|
|
|
devShell = system:
|
|
|
|
nixpkgs.legacyPackages.${system}.mkShell {
|
|
|
|
inputsFrom = builtins.attrValues (packages system);
|
2021-09-14 07:49:33 +00:00
|
|
|
NIXPKGS_PANDOC_FILTERS_PATH = "${nixpkgs + "/doc/build-aux/pandoc-filters"}";
|
2021-08-17 08:55:08 +00:00
|
|
|
};
|
2021-11-23 12:58:38 +00:00
|
|
|
|
|
|
|
apps = system:
|
|
|
|
{
|
|
|
|
flake-info = {
|
|
|
|
type = "app";
|
|
|
|
program = "${(packages system).flake_info}/bin/flake-info";
|
|
|
|
};
|
|
|
|
};
|
2020-06-18 22:41:01 +00:00
|
|
|
in
|
2021-08-17 08:55:08 +00:00
|
|
|
{
|
|
|
|
defaultPackage = forAllSystems (mkPackage ./.);
|
|
|
|
packages = forAllSystems packages;
|
|
|
|
devShell = forAllSystems devShell;
|
2021-11-23 12:58:38 +00:00
|
|
|
apps = forAllSystems apps;
|
|
|
|
defaultApp = forAllSystems (system: (apps system).flake-info);
|
2021-08-17 08:55:08 +00:00
|
|
|
};
|
2020-06-18 22:41:01 +00:00
|
|
|
}
|