Merge pull request #168727 from andersk/mozillavpn
mozillavpn: 2.7.1 → 2.8.0
This commit is contained in:
commit
3ad21f0c7f
@ -1,5 +1,6 @@
|
|||||||
{ buildGoModule
|
{ buildGoModule
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, go
|
, go
|
||||||
, lib
|
, lib
|
||||||
, pkg-config
|
, pkg-config
|
||||||
@ -13,6 +14,7 @@
|
|||||||
, qtquickcontrols2
|
, qtquickcontrols2
|
||||||
, qttools
|
, qttools
|
||||||
, qtwebsockets
|
, qtwebsockets
|
||||||
|
, rustPlatform
|
||||||
, stdenv
|
, stdenv
|
||||||
, which
|
, which
|
||||||
, wireguard-tools
|
, wireguard-tools
|
||||||
@ -45,24 +47,34 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
pname = "mozillavpn";
|
pname = "mozillavpn";
|
||||||
version = "2.7.1";
|
version = "2.8.0";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mozilla-mobile";
|
owner = "mozilla-mobile";
|
||||||
repo = "mozilla-vpn-client";
|
repo = "mozilla-vpn-client";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
hash = "sha256-i551UkCOwWnioe1YgCNZAlYiQJ4YDDBMoDZhfbkLTbs=";
|
hash = "sha256-UmLYs/J6syfMrjA66K33h8ubYqzvmcGf5spIilVVdVk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Rust bridge: Add Cargo.lock file
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/mozilla-mobile/mozilla-vpn-client/pull/3341/commits/718c7f52756b5a88511da91dafad7af312bb2473.patch";
|
||||||
|
hash = "sha256-fG+SATbJpGqpCFXSWEiBo4dYx6RLtJYR0yTdBqN6Fww=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
netfilter-go-modules = (buildGoModule {
|
netfilter-go-modules = (buildGoModule {
|
||||||
inherit pname version src;
|
inherit pname version src patches;
|
||||||
vendorSha256 = "sha256-KFYMim5U8WlJHValvIBQgEN+17SDv0JVbH03IiyfDc0=";
|
vendorSha256 = "KFYMim5U8WlJHValvIBQgEN+17SDv0JVbH03IiyfDc0=";
|
||||||
modRoot = "linux/netfilter";
|
modRoot = "linux/netfilter";
|
||||||
}).go-modules;
|
}).go-modules;
|
||||||
|
|
||||||
|
cargoRoot = "extension/bridge";
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit pname version src;
|
inherit pname version src patches cargoRoot;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
polkit
|
polkit
|
||||||
@ -81,10 +93,19 @@ stdenv.mkDerivation {
|
|||||||
python3.pkgs.pyyaml
|
python3.pkgs.pyyaml
|
||||||
qmake
|
qmake
|
||||||
qttools
|
qttools
|
||||||
|
rustPlatform.cargoSetupHook
|
||||||
|
rustPlatform.rust.cargo
|
||||||
which
|
which
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||||
|
inherit src patches;
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
preBuild = "cd ${cargoRoot}";
|
||||||
|
hash = "sha256-dnbF1hfm3qoZaPrIimhY2bUzlrYaNVUZ+nyp6NbgP3Y=";
|
||||||
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
for file in linux/*.service linux/extra/*.desktop src/platforms/linux/daemon/*.service; do
|
for file in linux/*.service linux/extra/*.desktop src/platforms/linux/daemon/*.service; do
|
||||||
substituteInPlace "$file" --replace /usr/bin/mozillavpn "$out/bin/mozillavpn"
|
substituteInPlace "$file" --replace /usr/bin/mozillavpn "$out/bin/mozillavpn"
|
||||||
@ -93,8 +114,8 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
ln -s '${netfilter-go-modules}' linux/netfilter/vendor
|
ln -s '${netfilter-go-modules}' linux/netfilter/vendor
|
||||||
python3 scripts/generate_glean.py
|
python3 scripts/utils/generate_glean.py
|
||||||
python3 scripts/importLanguages.py
|
python3 scripts/utils/import_languages.py --qt_path '${lib.getDev qttools}/bin'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
qmakeFlags = [ "USRPATH=$(out)" "ETCPATH=$(out)/etc" ];
|
qmakeFlags = [ "USRPATH=$(out)" "ETCPATH=$(out)/etc" ];
|
||||||
|
Loading…
Reference in New Issue
Block a user