aux-search/flake.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

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);
mkPackage = path: system:
2020-06-18 22:41:01 +00:00
let
pkgs = import nixpkgs {
inherit system;
overlays = [];
2020-06-18 22:41:01 +00:00
};
in
import path { inherit pkgs; };
packages = system:
2020-06-18 22:41:01 +00:00
{
flake-info = mkPackage ./flake-info system;
frontend = mkPackage ./. system;
2020-06-18 22:41:01 +00:00
};
2021-08-17 08:55:08 +00:00
devShell = system:
let packages_inst = (packages system);
in
2021-08-17 08:55:08 +00:00
nixpkgs.legacyPackages.${system}.mkShell {
inputsFrom = builtins.attrValues packages_inst;
shellHook = ''
export NIXPKGS_PANDOC_FILTERS_PATH="${packages_inst.flake_info.NIXPKGS_PANDOC_FILTERS_PATH}";
'';
2021-08-17 08:55:08 +00:00
};
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;
};
2020-06-18 22:41:01 +00:00
}