lol

Merge pull request #295233 from oluceps/add-moproxy

moproxy: init at 0.5.1

authored by

Aleksana and committed by
GitHub
455a72cb 15083922

+40
+40
pkgs/by-name/mo/moproxy/package.nix
··· 1 + { fetchFromGitHub 2 + , rustPlatform 3 + , fetchurl 4 + , lib 5 + }: 6 + 7 + rustPlatform.buildRustPackage rec{ 8 + pname = "moproxy"; 9 + version = "0.5.1"; 10 + 11 + src = fetchFromGitHub { 12 + owner = "sorz"; 13 + repo = "moproxy"; 14 + rev = "v${version}"; 15 + hash = "sha256-Rqno+cg44IWBJbKWUP6BnxzwCjuNhFo9nBF6u2jlyA4="; 16 + }; 17 + 18 + cargoHash = "sha256-EunlvI7I6d93wb3hxgxsyAXkzxRlDu0fq9qqjnbzzWg="; 19 + 20 + preBuild = 21 + let 22 + webBundle = fetchurl { 23 + url = "https://github.com/sorz/moproxy-web/releases/download/v0.1.8/build.zip"; 24 + hash = "sha256-bLC76LnTWR2/xnDcZtX/t0OUmP7vdI/o3TCRzG9eH/g="; 25 + }; 26 + in 27 + '' 28 + # build script try to download from network 29 + sed -i '15s/.*/let zip_path = PathBuf::from("${lib.escape ["/"] (toString webBundle)}");/' build.rs 30 + ''; 31 + 32 + meta = with lib; { 33 + homepage = "https://github.com/sorz/moproxy"; 34 + description = "A transparent TCP to SOCKSv5/HTTP proxy on Linux written in Rust"; 35 + license = licenses.mit; 36 + mainProgram = "moproxy"; 37 + maintainers = with maintainers; [ oluceps ]; 38 + platforms = platforms.linux; 39 + }; 40 + }