ALPHA: wire is a tool to deploy nixos systems
wire.althaea.zone/
1{
2 perSystem =
3 {
4 craneLib,
5 pkgs,
6 commonArgs,
7 ...
8 }:
9 let
10 tests = craneLib.buildPackage (
11 {
12 cargoArtifacts = craneLib.buildDepsOnly commonArgs;
13 doCheck = false;
14
15 doNotPostBuildInstallCargoBinaries = true;
16
17 buildPhase = ''
18 cargo test --no-run
19 '';
20
21 installPhaseCommand = ''
22 mkdir -p $out
23 cp $(ls target/debug/deps/{wire,lib,agent}-* | grep -v "\.d") $out
24 '';
25 }
26 // commonArgs
27 );
28 in
29 {
30 packages.cargo-tests = pkgs.writeShellScriptBin "run-tests" ''
31 set -e
32 for item in "${tests}"/*; do
33 echo "running $item"
34 "$item"
35 done
36 '';
37 };
38}