1 { version, lib, stdenv, pkgsCross, testers, cloudflared, runCommand, wine, wine64 }:
4 inherit (stdenv) buildPlatform;
7 version = testers.testVersion {
9 command = "cloudflared help";
11 refuses-to-autoupdate = runCommand "cloudflared-${version}-refuses-to-autoupdate"
13 nativeBuildInputs = [ cloudflared ];
16 cloudflared update 2>&1 | tee output.txt
17 if ! grep "cloudflared was installed by nixpkgs" output.txt
19 echo "cloudflared's output didn't contain the package manager name"
24 } // lib.optionalAttrs (buildPlatform.isLinux && (buildPlatform.isi686 || buildPlatform.isx86_64)) {
25 runs-through-wine = runCommand "cloudflared-${version}-runs-through-wine"
27 nativeBuildInputs = [ wine ];
28 exe = "${pkgsCross.mingw32.cloudflared}/bin/cloudflared.exe";
30 export HOME="$(mktemp -d)"
34 } // lib.optionalAttrs (buildPlatform.isLinux && buildPlatform.isx86_64) {
35 runs-through-wine64 = runCommand "cloudflared-${version}-runs-through-wine64"
37 nativeBuildInputs = [ wine64 ];
38 exe = "${pkgsCross.mingwW64.cloudflared}/bin/cloudflared.exe";
40 export HOME="$(mktemp -d)"