2020-06-18 22:41:01 +00:00
|
|
|
{
|
|
|
|
description = "Code behind search.nixos.org";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs = { url = "nixpkgs/nixos-unstable"; };
|
|
|
|
poetry2nix = { url = "github:nix-community/poetry2nix"; };
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, poetry2nix }:
|
|
|
|
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;
|
2020-08-28 12:25:38 +00:00
|
|
|
overlays = [ poetry2nix.overlay ];
|
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
|
|
|
{
|
2020-08-28 12:25:38 +00:00
|
|
|
import_scripts = mkPackage ./import-scripts system;
|
|
|
|
frontend = mkPackage ./. system;
|
2020-06-18 22:41:01 +00:00
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
2020-08-28 12:25:38 +00:00
|
|
|
defaultPackage = forAllSystems (mkPackage ./.);
|
|
|
|
packages = forAllSystems packages;
|
2020-06-18 22:41:01 +00:00
|
|
|
};
|
|
|
|
}
|