get complement via flake inputs

Flake lock file updates:

• Added input 'complement':
    'github:matrix-org/complement/d73c81a091604b0fc5b6b0617dcac58c25763f57?narHash=sha256-hom/Lt0gZzLWqFhUJG0X2i88CAMIILInO5w0tPj6G3s%3D' (2024-04-18)
This commit is contained in:
Charles Hall 2024-04-21 18:44:39 -07:00 committed by June
parent b635e807ef
commit d2c3275323
2 changed files with 19 additions and 8 deletions

View file

@ -1,6 +1,7 @@
{
inputs = {
attic.url = "github:zhaofengli/attic?ref=main";
complement = { url = "github:matrix-org/complement"; flake = false; };
crane = { url = "github:ipetkov/crane?ref=master"; inputs.nixpkgs.follows = "nixpkgs"; };
fenix = { url = "github:nix-community/fenix"; inputs.nixpkgs.follows = "nixpkgs"; };
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
@ -197,19 +198,12 @@
};
createComplementRuntime = pkgs: image: let
complement = pkgs.fetchFromGitHub {
owner = "matrix-org";
repo = "complement";
rev = "d73c81a091604b0fc5b6b0617dcac58c25763f57";
hash = "sha256-hom/Lt0gZzLWqFhUJG0X2i88CAMIILInO5w0tPj6G3s";
};
script = pkgs.writeShellScriptBin "run.sh"
''
export PATH=${pkgs.lib.makeBinPath [ pkgs.olm pkgs.gcc ]}
${pkgs.lib.getExe pkgs.docker} load < ${image}
set +o pipefail
/usr/bin/env -C "${complement}" COMPLEMENT_BASE_IMAGE="complement-conduit:dev" ${pkgs.lib.getExe pkgs.go} test -json ${complement}/tests | ${pkgs.toybox}/bin/tee $1
/usr/bin/env -C "${inputs.complement}" COMPLEMENT_BASE_IMAGE="complement-conduit:dev" ${pkgs.lib.getExe pkgs.go} test -json ${inputs.complement}/tests | ${pkgs.toybox}/bin/tee $1
set -o pipefail
# Post-process the results into an easy-to-compare format