2022-07-31 16:09:40 +03:00
|
|
|
{
|
2023-01-08 21:34:34 +02:00
|
|
|
perSystem = { filters, inputs', lib, pkgs, ... }:
|
2021-06-05 23:59:06 +03:00
|
|
|
|
2022-07-31 16:09:40 +03:00
|
|
|
let
|
|
|
|
tools = import ./lib/tools.nix;
|
|
|
|
packages = builtins.mapAttrs (_: v: v.packages) inputs';
|
|
|
|
in with tools;
|
2021-06-05 23:59:06 +03:00
|
|
|
|
2022-07-31 16:09:40 +03:00
|
|
|
{
|
|
|
|
packages = filters.doFilter filters.packages rec {
|
|
|
|
inherit (packages.deploy-rs) deploy-rs;
|
2022-05-24 19:22:43 +03:00
|
|
|
|
2022-07-31 16:09:40 +03:00
|
|
|
nix-super = packages.nix-super.nix;
|
2022-05-24 19:22:43 +03:00
|
|
|
|
2022-07-31 16:09:40 +03:00
|
|
|
agenix = packages.agenix.agenix.override { nix = nix-super; };
|
|
|
|
|
2023-01-08 21:34:34 +02:00
|
|
|
# hci-agent's build code does some funny shenanigans
|
|
|
|
hercules-ci-agent = let
|
|
|
|
original = packages.hercules-ci-agent.hercules-ci-agent;
|
|
|
|
patchedNix = patch-rename-direct original.nix ({ version, ...}: "nix-${version}_hci1") "patches/extra/hercules-ci-agent/nix";
|
|
|
|
in (original.override {
|
|
|
|
# for hercules-ci-cnix-expr, hercules-ci-cnix-store
|
|
|
|
nix = patchedNix;
|
|
|
|
# for cachix
|
|
|
|
pkgs = pkgs // { nix = patchedNix; };
|
|
|
|
}).overrideAttrs (old: {
|
|
|
|
# for hercules-ci-agent
|
|
|
|
buildInputs = (lib.remove original.nix old.buildInputs) ++ [ patchedNix ];
|
|
|
|
});
|
2022-07-31 16:09:40 +03:00
|
|
|
|
|
|
|
hci = packages.hercules-ci-agent.hercules-ci-cli;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|