depot/ci-root.nix

47 lines
1.9 KiB
Nix

# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ system ? builtins.currentSystem, ... }:
let
depot = (import ./default.nix { inherit system; });
pkgs = depot.third_party.nixpkgs;
lib = pkgs.lib;
prefixAttrs = prefix: lib.mapAttrsToList (name: value: { name = "${prefix}-${name}"; path = value; });
ciBits = rec {
x86_64-linux = {
machine = depot.ops.nixos.systems;
pkgs = builtins.removeAttrs depot.nix.pkgs [ "grafana-plugins" "windows" "unifiHacked" "nixpkgs-mozilla" "nightlyRust" "nightlyRustPlatform" "baserow" "baserow-oss" "authentik" ];
pkg-baserow = {
inherit (depot.nix.pkgs.baserow) backend web-frontend mjml-tcpserver;
};
pkg-baserow-oss = {
inherit (depot.nix.pkgs.baserow-oss) backend web-frontend mjml-tcpserver;
};
pkg-authentik = {
inherit (depot.nix.pkgs.authentik) docs webui pythonapp goserver server;
};
pkg-grafana-plugins = depot.nix.pkgs.grafana-plugins;
web = lib.filterAttrs (n: v: !lib.isFunction v) depot.web;
trains = depot.go.trains.cmd.bins;
other = {
twitterchiver-archiver = depot.go.twitterchiver.archiver;
twitterchiver-archiver-docker = depot.go.twitterchiver.archiver.dockerImage;
twitternuke = depot.go.twitternuke;
systemPathJSON = depot.ops.nixos.systemPathJSON;
};
factorio = depot.ops.factorio;
home-manager = depot.ops.home-manager-ext.built;
};
aarch64-linux = builtins.removeAttrs x86_64-linux [ "home-manager" ] // {
pkgs = builtins.removeAttrs x86_64-linux.pkgs [ "lutris" ];
};
x86_64-darwin = {
home-manager = depot.ops.home-manager-ext.built;
};
aarch64-darwin = x86_64-darwin;
}.${builtins.currentSystem};
in
pkgs.linkFarm "ci" (builtins.concatLists (lib.mapAttrsToList prefixAttrs ciBits))