diff --git a/pkgs/tools/networking/obfs4/default.nix b/pkgs/tools/networking/obfs4/default.nix index af64c8190ebc..edaf6d27c8d8 100644 --- a/pkgs/tools/networking/obfs4/default.nix +++ b/pkgs/tools/networking/obfs4/default.nix @@ -1,16 +1,27 @@ -{ lib, fetchgit, buildGoModule }: +{ lib, buildGoModule, fetchFromGitLab, installShellFiles }: buildGoModule rec { pname = "obfs4"; - version = "0.0.12"; + version = "0.0.14"; - src = fetchgit { - url = "https://git.torproject.org/pluggable-transports/obfs4.git"; - rev = "a564bc3840bc788605e1a8155f4b95ce0d70c6db"; # not tagged - sha256 = "0hqk540q94sh4wvm31jjcvpdklhf8r35in4yii7xnfn58a7amfkc"; + src = fetchFromGitLab { + domain = "gitlab.torproject.org"; + group = "tpo"; + owner = "anti-censorship/pluggable-transports"; + repo = "obfs4"; + rev = "obfs4proxy-${version}"; + sha256 = "sha256-/d1qub/mhEzzLQFytgAlhz8ukIC9d+GPK2Hfi3NMv+M="; }; - vendorSha256 = "0yjanv5piygffpdfysviijl7cql2k0r05bsxnlj4hbamsriz9xqy"; + vendorHash = "sha256-7NF3yMouhjSM9SBNKHkeWV7qy0XTGnepEX28kBpbgdk="; + + ldflags = [ "-s" "-w" ]; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installManPage doc/obfs4proxy.1 + ''; meta = with lib; { description = "Circumvents censorship by transforming Tor traffic between clients and bridges"; @@ -25,11 +36,10 @@ buildGoModule rec { specification, and its modular architecture allows it to support multiple pluggable transports. ''; - homepage = "https://www.torproject.org/projects/obfsproxy"; + homepage = "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/obfs4"; maintainers = with maintainers; [ thoughtpolice ]; mainProgram = "obfs4proxy"; - changelog = "https://gitweb.torproject.org/pluggable-transports/obfs4.git/plain/ChangeLog"; - downloadPage = "https://gitweb.torproject.org/pluggable-transports/obfs4.git/"; + changelog = "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/obfs4/-/raw/${src.rev}/ChangeLog"; license = with lib.licenses; [ bsd2 bsd3 gpl3 ]; }; }