nixpkgs/pkgs/by-name/ws/wstunnel/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

49 lines
1.1 KiB
Nix
Raw Normal View History

2024-06-06 23:31:04 +02:00
{ fetchFromGitHub
, rustPlatform
, lib
}:
2024-06-13 10:18:57 +02:00
let
version = "9.7.0";
in
rustPlatform.buildRustPackage {
2024-06-06 23:31:04 +02:00
pname = "wstunnel";
2024-06-13 10:18:57 +02:00
inherit version;
2024-06-06 23:31:04 +02:00
src = fetchFromGitHub {
owner = "erebe";
2024-06-13 10:18:57 +02:00
repo = "wstunnel";
2024-06-06 23:31:04 +02:00
rev = "v${version}";
2024-06-13 10:18:57 +02:00
hash = "sha256-8bLccR6ZmldmrvjlZKFHEa4PoLzyUcLkyQbwSrJjoyY=";
2024-06-06 23:31:04 +02:00
};
2024-06-13 10:18:57 +02:00
cargoHash = "sha256-IAq7Fyr6Ne1Bq18WfqBoppel9FOWSs8PkiXKMwcJ26c=";
2024-06-06 23:31:04 +02:00
checkFlags = [
2024-06-13 10:18:57 +02:00
# Tries to launch a test container
2024-06-06 23:31:04 +02:00
"--skip=tcp::tests::test_proxy_connection"
];
2024-06-13 10:18:57 +02:00
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
actual="$($out/bin/wstunnel --version)"
expected="${pname} ${version}"
echo "Check that 'wstunnel --version' returns: $expected"
if [[ "$actual" != "$expected" ]]; then
echo "'wstunnel --version' returned: $actual"
exit 1
fi
runHook postInstallCheck
'';
2024-06-06 23:31:04 +02:00
meta = {
2024-06-13 10:18:57 +02:00
description = "Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI";
homepage = "https://github.com/erebe/wstunnel";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ rvdp neverbehave ];
2024-06-06 23:31:04 +02:00
mainProgram = "wstunnel";
};
}