Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 62 lines 1.2 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 enableGUI ? false, # upstream working in progress 6 pkg-config, 7 glfw, 8 xorg, 9 libXcursor, 10 libXrandr, 11 libXinerama, 12 xinput, 13 libXi, 14 libXxf86vm, 15}: 16buildGoModule rec { 17 pname = "bepass"; 18 version = "1.6.2"; 19 20 src = fetchFromGitHub { 21 owner = "bepass-org"; 22 repo = "bepass"; 23 rev = "v${version}"; 24 hash = "sha256-ruOhPWNs1WWM3r6X+6ch0HoDCu/a+IkBQiCr0Wh6yS8="; 25 }; 26 27 vendorHash = "sha256-Juie/Hq3i6rvAK19x6ah3SCQJL0uCrmV9gvzHih3crY="; 28 29 subPackages = [ 30 "cmd/cli" 31 ]; 32 proxyVendor = true; 33 nativeBuildInputs = lib.optionals enableGUI [ pkg-config ]; 34 buildInputs = lib.optionals enableGUI [ 35 glfw 36 xorg.libXft 37 libXcursor 38 libXrandr 39 libXinerama 40 libXi 41 xinput 42 libXxf86vm 43 ]; 44 45 ldflags = [ 46 "-s" 47 "-w" 48 ]; 49 50 postInstall = '' 51 mv $out/bin/cli $out/bin/bepass 52 ''; 53 54 meta = with lib; { 55 homepage = "https://github.com/bepass-org/bepass"; 56 description = "Simple DPI bypass tool written in go"; 57 license = licenses.mit; 58 mainProgram = "bepass"; 59 maintainers = with maintainers; [ oluceps ]; 60 broken = enableGUI; 61 }; 62}