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