btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / ob / obfs4 / package.nix
bloba0b69e54c6d0615262bff372093f272a51dea9d5
1 { lib, buildGoModule, fetchFromGitLab, installShellFiles }:
3 buildGoModule rec {
4   pname = "obfs4";
5   version = "0.4.0";
7   src = fetchFromGitLab {
8     domain = "gitlab.torproject.org";
9     group = "tpo";
10     owner = "anti-censorship/pluggable-transports";
11     # We don't use pname = lyrebird and we use the old obfs4 name as the first
12     # will collide with lyrebird Gtk3 program.
13     repo = "lyrebird";
14     rev = "lyrebird-${version}";
15     hash = "sha256-aPALWvngC/BVQO73yUAykHvEb6T0DZcGMowXINDqhpQ=";
16   };
18   vendorHash = "sha256-iR3+ZMEF0SB3EoLTf2gtqTe3CQcjtDRhfwwbwGj3pXo=";
20   ldflags = [ "-s" "-w" ];
22   subPackages = [ "cmd/lyrebird" ];
24   nativeBuildInputs = [ installShellFiles ];
26   postInstall = ''
27     installManPage doc/lyrebird.1
28     ln -s $out/share/man/man1/{lyrebird,obfs4proxy}.1
29   '';
31   meta = with lib; {
32     description = "Circumvents censorship by transforming Tor traffic between clients and bridges";
33     longDescription = ''
34       Obfs4proxy is a tool that attempts to circumvent censorship by
35       transforming the Tor traffic between the client and the bridge.
36       This way censors, who usually monitor traffic between the client
37       and the bridge, will see innocent-looking transformed traffic
38       instead of the actual Tor traffic.  obfs4proxy implements the
39       obfsucation protocols obfs2, obfs3, and obfs4.  It is written in
40       Go and is compliant with the Tor pluggable transports
41       specification, and its modular architecture allows it to support
42       multiple pluggable transports.
43     '';
44     homepage = "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird";
45     maintainers = with maintainers; [ thoughtpolice ];
46     mainProgram = "lyrebird";
47     changelog = "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/lyrebird/-/raw/${src.rev}/ChangeLog";
48     license = with lib.licenses; [ bsd2 bsd3 gpl3 ];
49   };