depot/third_party/nixpkgs/pkgs/by-name/be/bepass/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

61 lines
1.1 KiB
Nix

{ lib
, buildGoModule
, fetchFromGitHub
, enableGUI ? false # upstream working in progress
, pkg-config
, glfw
, xorg
, libXcursor
, libXrandr
, libXinerama
, xinput
, libXi
, libXxf86vm
}:
buildGoModule rec{
pname = "bepass";
version = "1.6.2";
src = fetchFromGitHub {
owner = "bepass-org";
repo = "bepass";
rev = "v${version}";
hash = "sha256-ruOhPWNs1WWM3r6X+6ch0HoDCu/a+IkBQiCr0Wh6yS8=";
};
vendorHash = "sha256-Juie/Hq3i6rvAK19x6ah3SCQJL0uCrmV9gvzHih3crY=";
subPackages = [
"cmd/cli"
];
proxyVendor = true;
nativeBuildInputs = lib.optionals enableGUI [ pkg-config ];
buildInputs = lib.optionals enableGUI [
glfw
xorg.libXft
libXcursor
libXrandr
libXinerama
libXi
xinput
libXxf86vm
];
ldflags = [
"-s"
"-w"
];
postInstall = ''
mv $out/bin/cli $out/bin/bepass
'';
meta = with lib; {
homepage = "https://github.com/bepass-org/bepass";
description = "Simple DPI bypass tool written in go";
license = licenses.mit;
mainProgram = "bepass";
maintainers = with maintainers; [ oluceps ];
broken = enableGUI;
};
}