2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
2024-06-05 15:53:02 +00:00
|
|
|
, stdenv
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
2024-06-05 15:53:02 +00:00
|
|
|
, darwin
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec{
|
|
|
|
pname = "tuic";
|
|
|
|
version = "1.0.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "EAimTY";
|
|
|
|
repo = pname;
|
|
|
|
rev = "tuic-server-${version}";
|
|
|
|
hash = "sha256-VoNr91vDqBlt9asT/dwCeYk13UNiDexNNiKwD5DSn8k=";
|
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
2024-06-05 15:53:02 +00:00
|
|
|
Security
|
|
|
|
]);
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
postPatch = ''
|
|
|
|
ln -sf ${./Cargo.lock} Cargo.lock
|
|
|
|
'';
|
|
|
|
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
|
|
|
|
# doc test will fail in this version
|
|
|
|
checkFlags = [ "--skip=lib" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/EAimTY/tuic";
|
|
|
|
description = "Delicately-TUICed 0-RTT proxy protocol";
|
|
|
|
license = licenses.gpl3Only;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ oluceps ];
|
|
|
|
};
|
|
|
|
}
|