25 src = fetchFromGitHub {
26 owner = "mozilla-mobile";
27 repo = "mozilla-vpn-client";
29 fetchSubmodules = true;
30 hash = "sha256-am2acceDig7tjhkO5GiWfvkq0Mabyxedbc8mR49SXBU=";
33 netfilter-go-modules = (buildGoModule {
34 inherit pname version src;
35 modRoot = "linux/netfilter";
36 vendorHash = "sha256-Cmo0wnl0z5r1paaEf1MhCPbInWeoMhGjnxCxGh0cyO8=";
39 extensionBridgeDeps = rustPlatform.fetchCargoTarball {
41 name = "${pname}-${version}-extension-bridge";
42 preBuild = "cd extension/bridge";
43 hash = "sha256-sw6iylh3SgCDA1z/xvwNGWrCU2xr7IVPUL4fdOi43lc=";
46 signatureDeps = rustPlatform.fetchCargoTarball {
48 name = "${pname}-${version}-signature";
49 preBuild = "cd signature";
50 hash = "sha256-gBJIzTTo6i415aHwUsBriokUt2K/r55QCpC6Tv8GXh4=";
55 inherit pname version src;
70 python3.pkgs.glean-parser
73 python3.pkgs.setuptools
74 rustPlatform.cargoSetupHook
75 rustPlatform.rust.cargo
81 pushd source/extension/bridge
82 cargoDeps='${extensionBridgeDeps}' cargoSetupPostUnpackHook
83 extensionBridgeDepsCopy="$cargoDepsCopy"
86 pushd source/signature
87 cargoDeps='${signatureDeps}' cargoSetupPostUnpackHook
88 signatureDepsCopy="$cargoDepsCopy"
91 dontCargoSetupPostUnpack = true;
94 for file in linux/*.service linux/extra/*.desktop src/platforms/linux/daemon/*.service; do
95 substituteInPlace "$file" --replace /usr/bin/mozillavpn "$out/bin/mozillavpn"
98 substituteInPlace scripts/addon/build.py \
99 --replace 'qtbinpath = args.qtpath' 'qtbinpath = "${qttools.dev}/bin"' \
100 --replace 'rcc = os.path.join(qtbinpath, rcc_bin)' 'rcc = "${qtbase.dev}/libexec/rcc"'
102 substituteInPlace src/cmake/linux.cmake \
103 --replace '/etc/xdg/autostart' "$out/etc/xdg/autostart" \
104 --replace '${"$"}{POLKIT_POLICY_DIR}' "$out/share/polkit-1/actions" \
105 --replace '/usr/share/dbus-1' "$out/share/dbus-1" \
106 --replace '${"$"}{SYSTEMD_UNIT_DIR}' "$out/lib/systemd/system"
108 substituteInPlace extension/CMakeLists.txt \
109 --replace '/etc' "$out/etc"
111 substituteInPlace src/connectionbenchmark/benchmarktaskdownload.cpp \
112 --replace 'QT_VERSION >= 0x060400' 'false'
114 ln -s '${netfilter-go-modules}' linux/netfilter/vendor
116 pushd extension/bridge
117 cargoDepsCopy="$extensionBridgeDepsCopy" cargoSetupPostPatchHook
121 cargoDepsCopy="$signatureDepsCopy" cargoSetupPostPatchHook
124 cargoSetupPostPatchHook() { true; }
128 "-DQT_LCONVERT_EXECUTABLE=${qttools.dev}/bin/lconvert"
129 "-DQT_LUPDATE_EXECUTABLE=${qttools.dev}/bin/lupdate"
130 "-DQT_LRELEASE_EXECUTABLE=${qttools.dev}/bin/lrelease"
135 [ "--prefix" "PATH" ":" (lib.makeBinPath [ wireguard-tools ]) ];
138 description = "Client for the Mozilla VPN service";
139 homepage = "https://vpn.mozilla.org/";
140 license = lib.licenses.mpl20;
141 maintainers = with lib.maintainers; [ andersk ];
142 platforms = lib.platforms.linux;