uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
136
pkgs/tools/networking/mozillavpn/default.nix
Normal file
136
pkgs/tools/networking/mozillavpn/default.nix
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
{ buildGoModule
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, go
|
||||
, lib
|
||||
, pkg-config
|
||||
, polkit
|
||||
, python3
|
||||
, qmake
|
||||
, qtbase
|
||||
, qtcharts
|
||||
, qtgraphicaleffects
|
||||
, qtnetworkauth
|
||||
, qtquickcontrols2
|
||||
, qttools
|
||||
, qtwebsockets
|
||||
, rustPlatform
|
||||
, stdenv
|
||||
, which
|
||||
, wireguard-tools
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
let
|
||||
glean_parser_4_1_1 = python3.pkgs.buildPythonPackage rec {
|
||||
pname = "glean_parser";
|
||||
version = "4.1.1";
|
||||
src = python3.pkgs.fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-4noazRqjjJNI2kTO714kSp70jZpWmqHWR2vnkgAftLE=";
|
||||
};
|
||||
nativeBuildInputs = with python3.pkgs; [ setuptools-scm ];
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
appdirs
|
||||
click
|
||||
diskcache
|
||||
jinja2
|
||||
jsonschema
|
||||
pyyaml
|
||||
setuptools
|
||||
yamllint
|
||||
];
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py --replace '"pytest-runner", ' ""
|
||||
'';
|
||||
doCheck = false;
|
||||
};
|
||||
|
||||
pname = "mozillavpn";
|
||||
version = "2.8.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mozilla-mobile";
|
||||
repo = "mozilla-vpn-client";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-eKgoRE/JDEQEFp7xYY60ARDgw/n5VoZpD/Gb/CWzHuo=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Rust bridge: Add Cargo.lock file
|
||||
(fetchpatch {
|
||||
url = "https://github.com/mozilla-mobile/mozilla-vpn-client/commit/05c9a366cf9dc4e378485c8e9d494f77c35dbb8c.patch";
|
||||
hash = "sha256-fG+SATbJpGqpCFXSWEiBo4dYx6RLtJYR0yTdBqN6Fww=";
|
||||
})
|
||||
];
|
||||
|
||||
netfilter-go-modules = (buildGoModule {
|
||||
inherit pname version src patches;
|
||||
vendorSha256 = "KFYMim5U8WlJHValvIBQgEN+17SDv0JVbH03IiyfDc0=";
|
||||
modRoot = "linux/netfilter";
|
||||
}).go-modules;
|
||||
|
||||
cargoRoot = "extension/bridge";
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit pname version src patches cargoRoot;
|
||||
|
||||
buildInputs = [
|
||||
polkit
|
||||
qtbase
|
||||
qtcharts
|
||||
qtgraphicaleffects
|
||||
qtnetworkauth
|
||||
qtquickcontrols2
|
||||
qtwebsockets
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
glean_parser_4_1_1
|
||||
go
|
||||
pkg-config
|
||||
python3
|
||||
python3.pkgs.pyyaml
|
||||
qmake
|
||||
qttools
|
||||
rustPlatform.cargoSetupHook
|
||||
rustPlatform.rust.cargo
|
||||
which
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoTarball {
|
||||
inherit src patches;
|
||||
name = "${pname}-${version}";
|
||||
preBuild = "cd ${cargoRoot}";
|
||||
hash = "sha256-C0wPmGVXbhUs0IzeIMZD6724P0XTOzeK1bzrnUMPlWo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
for file in linux/*.service linux/extra/*.desktop src/platforms/linux/daemon/*.service; do
|
||||
substituteInPlace "$file" --replace /usr/bin/mozillavpn "$out/bin/mozillavpn"
|
||||
done
|
||||
'';
|
||||
|
||||
preBuild = ''
|
||||
ln -s '${netfilter-go-modules}' linux/netfilter/vendor
|
||||
python3 scripts/utils/generate_glean.py
|
||||
python3 scripts/utils/import_languages.py --qt_path '${lib.getDev qttools}/bin'
|
||||
'';
|
||||
|
||||
qmakeFlags = [
|
||||
"USRPATH=$(out)"
|
||||
"ETCPATH=$(out)/etc"
|
||||
"CONFIG-=debug" # https://github.com/mozilla-mobile/mozilla-vpn-client/pull/3539
|
||||
];
|
||||
qtWrapperArgs =
|
||||
[ "--prefix" "PATH" ":" (lib.makeBinPath [ wireguard-tools ]) ];
|
||||
|
||||
meta = {
|
||||
description = "Client for the Mozilla VPN service";
|
||||
homepage = "https://vpn.mozilla.org/";
|
||||
license = lib.licenses.mpl20;
|
||||
maintainers = with lib.maintainers; [ andersk ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue