11 stdenv.mkDerivation rec {
13 version = "20230206.0";
15 src = fetchFromGitHub {
19 hash = "sha256-mchSaqw6sOJ7+dydCM8juP7QMOVUrPL4MFA79Rvyjdo=";
23 # Add install target to CMakeLists.txt
24 # https://github.com/wangyu-/udp2raw/pull/469
26 url = "https://github.com/wangyu-/udp2raw/commit/4559e6d47bb69fda0fbd3fb4b7d04ddb1cf5e2ae.patch";
27 hash = "sha256-2csZdXmMW89tjXhN5QIK0rnMSXlFjLvwGnmieeKRX90=";
32 echo 'const char *gitversion = "${version}";' > git_version.h
33 # Adress sanitization crashes the application, reported upstream at https://github.com/wangyu-/udp2raw/issues/474
34 substituteInPlace CMakeLists.txt --replace "sanitize=address," "sanitize="
43 wrapProgram "$out/bin/udp2raw" --prefix PATH : "${lib.makeBinPath [ iptables ]}"
47 homepage = "https://github.com/wangyu-/udp2raw";
48 description = "Tunnel which turns UDP traffic into encrypted UDP/FakeTCP/ICMP traffic by using a raw socket";
49 mainProgram = "udp2raw";
50 license = licenses.mit;
51 changelog = "https://github.com/wangyu-/udp2raw/releases/tag/${version}";
52 maintainers = with maintainers; [ chvp ];
53 platforms = platforms.linux;