riseup-vpn: 0.21.11 -> 0.24.8
This commit is contained in:
parent
7f7842a099
commit
a55d847171
17
pkgs/tools/networking/bitmask-vpn/build_release.patch
Normal file
17
pkgs/tools/networking/bitmask-vpn/build_release.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/bitmask.pro b/bitmask.pro
|
||||||
|
index f377bb4..3c71a71 100644
|
||||||
|
--- a/bitmask.pro
|
||||||
|
+++ b/bitmask.pro
|
||||||
|
@@ -4,9 +4,9 @@ QT += quickcontrols2 svg
|
||||||
|
CONFIG += qt staticlib
|
||||||
|
CONFIG += c++17 strict_c++
|
||||||
|
CONFIG += qtquickcompiler
|
||||||
|
-CONFIG+=force_debug_info
|
||||||
|
-CONFIG+=debug_and_release
|
||||||
|
-#CONFIG+=release
|
||||||
|
+#CONFIG+=force_debug_info
|
||||||
|
+#CONFIG+=debug_and_release
|
||||||
|
+CONFIG+=release
|
||||||
|
windows:CONFIG -= console
|
||||||
|
unix:DEBUG:CONFIG += debug
|
||||||
|
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5")
|
@ -1,7 +1,7 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, substituteAll
|
||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
, mkDerivation
|
|
||||||
, buildGoModule
|
, buildGoModule
|
||||||
, wrapQtAppsHook
|
, wrapQtAppsHook
|
||||||
, python3Packages
|
, python3Packages
|
||||||
@ -13,32 +13,29 @@
|
|||||||
, iproute2
|
, iproute2
|
||||||
, iptables
|
, iptables
|
||||||
, procps
|
, procps
|
||||||
, qmltermwidget
|
|
||||||
, qtbase
|
, qtbase
|
||||||
, qtdeclarative
|
, qtdeclarative
|
||||||
, qtgraphicaleffects
|
, qtsvg
|
||||||
, qtinstaller
|
|
||||||
, qtquickcontrols
|
|
||||||
, qtquickcontrols2
|
|
||||||
, qttools
|
, qttools
|
||||||
|
, qtwayland
|
||||||
, CoreFoundation
|
, CoreFoundation
|
||||||
, Security
|
, Security
|
||||||
, provider ? "riseup"
|
, provider ? "riseup"
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
version = "0.21.11";
|
version = "0.24.8";
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
src = fetchFromGitLab {
|
||||||
domain = "0xacab.org";
|
domain = "0xacab.org";
|
||||||
owner = "leap";
|
owner = "leap";
|
||||||
repo = "bitmask-vpn";
|
repo = "bitmask-vpn";
|
||||||
rev = version;
|
rev = "8b3ac473f64b6de0262fbf945ff25af8029134f1";
|
||||||
sha256 = "sha256-mhmKG6Exxh64oeeeLezJYWEw61iIHLasHjLomd2L8P4=";
|
sha256 = "sha256-nYMfO091w6H7LyY1+aYubFppg4/3GiZZm4e+0m9Gb3k=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# bitmask-root is only used on GNU/Linux
|
# bitmask-root is only used on GNU/Linux
|
||||||
# and may one day be replaced by pkg/helper
|
# and may one day be replaced by pkg/helper
|
||||||
bitmask-root = mkDerivation {
|
bitmask-root = stdenv.mkDerivation {
|
||||||
inherit src version;
|
inherit src version;
|
||||||
sourceRoot = "${src.name}/helpers";
|
sourceRoot = "${src.name}/helpers";
|
||||||
pname = "bitmask-root";
|
pname = "bitmask-root";
|
||||||
@ -70,6 +67,18 @@ buildGoModule rec {
|
|||||||
pname = "${provider}-vpn";
|
pname = "${provider}-vpn";
|
||||||
vendorHash = null;
|
vendorHash = null;
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# This patch fixes the paths in the build script generated by qmake
|
||||||
|
# to use the correct paths for qmlcachegen and lrelease
|
||||||
|
(substituteAll {
|
||||||
|
src = ./fix_paths.patch;
|
||||||
|
inherit qtbase qtdeclarative qttools;
|
||||||
|
})
|
||||||
|
|
||||||
|
# Don't build the debug version
|
||||||
|
./build_release.patch
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pkg/pickle/helpers.go \
|
substituteInPlace pkg/pickle/helpers.go \
|
||||||
--replace /usr/share $out/share
|
--replace /usr/share $out/share
|
||||||
@ -77,7 +86,7 @@ buildGoModule rec {
|
|||||||
# Using $PROVIDER is not working,
|
# Using $PROVIDER is not working,
|
||||||
# thus replacing directly into the vendor.conf
|
# thus replacing directly into the vendor.conf
|
||||||
substituteInPlace providers/vendor.conf \
|
substituteInPlace providers/vendor.conf \
|
||||||
--replace "provider = riseup" "provider = ${provider}"
|
--replace "provider = bitmask" "provider = ${provider}"
|
||||||
|
|
||||||
substituteInPlace branding/templates/debian/app.desktop-template \
|
substituteInPlace branding/templates/debian/app.desktop-template \
|
||||||
--replace "Icon=icon" "Icon=${pname}"
|
--replace "Icon=icon" "Icon=${pname}"
|
||||||
@ -87,7 +96,7 @@ buildGoModule rec {
|
|||||||
'' + lib.optionalString stdenv.hostPlatform.isLinux ''
|
'' + lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||||
substituteInPlace pkg/helper/linux.go \
|
substituteInPlace pkg/helper/linux.go \
|
||||||
--replace /usr/sbin/openvpn ${openvpn}/bin/openvpn
|
--replace /usr/sbin/openvpn ${openvpn}/bin/openvpn
|
||||||
substituteInPlace pkg/vpn/launcher_linux.go \
|
substituteInPlace pkg/launcher/launcher_linux.go \
|
||||||
--replace /usr/sbin/openvpn ${openvpn}/bin/openvpn \
|
--replace /usr/sbin/openvpn ${openvpn}/bin/openvpn \
|
||||||
--replace /usr/sbin/bitmask-root ${bitmask-root}/bin/bitmask-root \
|
--replace /usr/sbin/bitmask-root ${bitmask-root}/bin/bitmask-root \
|
||||||
--replace /usr/bin/lxpolkit /run/wrappers/bin/polkit-agent-helper-1 \
|
--replace /usr/bin/lxpolkit /run/wrappers/bin/polkit-agent-helper-1 \
|
||||||
@ -98,21 +107,20 @@ buildGoModule rec {
|
|||||||
cmake
|
cmake
|
||||||
pkg-config
|
pkg-config
|
||||||
python3Packages.wrapPython
|
python3Packages.wrapPython
|
||||||
qmake
|
|
||||||
qtquickcontrols2
|
|
||||||
qttools
|
|
||||||
which
|
which
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
] ++ lib.optional (!stdenv.hostPlatform.isLinux) qtinstaller;
|
qmake
|
||||||
|
qttools
|
||||||
|
qtsvg
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
qtbase
|
qtbase
|
||||||
qmltermwidget
|
|
||||||
qtdeclarative
|
qtdeclarative
|
||||||
qtgraphicaleffects
|
qtsvg
|
||||||
qtquickcontrols
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ]
|
||||||
qtquickcontrols2
|
++ lib.optionals stdenv.hostPlatform.isLinux [ qtwayland ];
|
||||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreFoundation Security ];
|
|
||||||
# FIXME: building on Darwin currently fails
|
# FIXME: building on Darwin currently fails
|
||||||
# due to missing debug symbols for Qt,
|
# due to missing debug symbols for Qt,
|
||||||
# this should be fixable once darwin.apple_sdk >= 10.13
|
# this should be fixable once darwin.apple_sdk >= 10.13
|
||||||
@ -123,13 +131,12 @@ buildGoModule rec {
|
|||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
make gen_providers_json
|
# TODO: this is a hack that copies the qrc file that should by built by qmlcachegen
|
||||||
make generate
|
# qmlcachegen is in qtdeclarative/libexec, but qmake is in qtbase/bin
|
||||||
# Remove timestamps in comments
|
# but qmake searches for qmlcachegen in qtbase/libexec which leads to the error
|
||||||
sed -i -e '/^\/\//d' pkg/config/version/version.go
|
mkdir -p build/qt
|
||||||
|
cp ${./gui_gui_qmlcache.qrc} build/qt/gui_gui_qmlcache.qrc
|
||||||
|
|
||||||
# Not using -j$NIX_BUILD_CORES because the Makefile's rules
|
|
||||||
# are not thread-safe: lib/libgoshim.h is used before being built.
|
|
||||||
make build
|
make build
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
|
13
pkgs/tools/networking/bitmask-vpn/fix_paths.patch
Normal file
13
pkgs/tools/networking/bitmask-vpn/fix_paths.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/gui/build.sh b/gui/build.sh
|
||||||
|
index a858a81..ac43f52 100755
|
||||||
|
--- a/gui/build.sh
|
||||||
|
+++ b/gui/build.sh
|
||||||
|
@@ -94,6 +94,8 @@ function buildQmake {
|
||||||
|
mkdir -p $QTBUILD
|
||||||
|
$QMAKE -early QMAKE_CC=$CC QMAKE_CXX=$CXX QMAKE_LINK=$CXX -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH="${VENDOR_PATH}" $PROJECT
|
||||||
|
#CONFIG=+force_debug_info CONFIG+=debug CONFIG+=debug_and_release
|
||||||
|
+ sed -i 's|@qtbase@/libexec/qmlcachegen|@qtdeclarative@/libexec/qmlcachegen|g' $QTBUILD/Makefile
|
||||||
|
+ sed -i 's|@qtbase@/bin/lrelease|@qttools@/bin/lrelease|g' $QTBUILD/Makefile
|
||||||
|
}
|
||||||
|
|
||||||
|
function renameOutput {
|
107
pkgs/tools/networking/bitmask-vpn/gui_gui_qmlcache.qrc
Normal file
107
pkgs/tools/networking/bitmask-vpn/gui_gui_qmlcache.qrc
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file alias="main.qml">../../gui/main.qml</file>
|
||||||
|
<file alias="qtquickcontrols2.conf">../../gui/qtquickcontrols2.conf</file>
|
||||||
|
<file alias="themes/themes.js">../../gui/themes/themes.js</file>
|
||||||
|
<file alias="themes/theme-riseup.js">../../gui/themes/theme-riseup.js</file>
|
||||||
|
<file alias="themes/Riseup.qml">../../gui/themes/Riseup.qml</file>
|
||||||
|
<file alias="themes/theme-calyx.js">../../gui/themes/theme-calyx.js</file>
|
||||||
|
<file alias="themes/Calyx.qml">../../gui/themes/Calyx.qml</file>
|
||||||
|
<file alias="themes/Bitmask.qml">../../gui/themes/Bitmask.qml</file>
|
||||||
|
<file alias="themes/ThemeObject.qml">../../gui/themes/ThemeObject.qml</file>
|
||||||
|
<file alias="components/MainView.qml">../../gui/components/MainView.qml</file>
|
||||||
|
<file alias="components/ThemedPage.qml">../../gui/components/ThemedPage.qml</file>
|
||||||
|
<file alias="components/Splash.qml">../../gui/components/Splash.qml</file>
|
||||||
|
<file alias="components/FadeBehavior.qml">../../gui/components/FadeBehavior.qml</file>
|
||||||
|
<file alias="components/Home.qml">../../gui/components/Home.qml</file>
|
||||||
|
<file alias="components/Header.qml">../../gui/components/Header.qml</file>
|
||||||
|
<file alias="components/Footer.qml">../../gui/components/Footer.qml</file>
|
||||||
|
<file alias="components/About.qml">../../gui/components/About.qml</file>
|
||||||
|
<file alias="components/MaterialRadioButton.qml">../../gui/components/MaterialRadioButton.qml</file>
|
||||||
|
<file alias="components/MaterialRadioIndicator.qml">../../gui/components/MaterialRadioIndicator.qml</file>
|
||||||
|
<file alias="components/WrappedRadioButton.qml">../../gui/components/WrappedRadioButton.qml</file>
|
||||||
|
<file alias="components/MaterialCheckBox.qml">../../gui/components/MaterialCheckBox.qml</file>
|
||||||
|
<file alias="components/StatusBox.qml">../../gui/components/StatusBox.qml</file>
|
||||||
|
<file alias="components/Systray.qml">../../gui/components/Systray.qml</file>
|
||||||
|
<file alias="components/Help.qml">../../gui/components/Help.qml</file>
|
||||||
|
<file alias="components/Locations.qml">../../gui/components/Locations.qml</file>
|
||||||
|
<file alias="components/SignalIcon.qml">../../gui/components/SignalIcon.qml</file>
|
||||||
|
<file alias="components/Preferences.qml">../../gui/components/Preferences.qml</file>
|
||||||
|
<file alias="components/BoldLabel.qml">../../gui/components/BoldLabel.qml</file>
|
||||||
|
<file alias="components/LightLabel.qml">../../gui/components/LightLabel.qml</file>
|
||||||
|
<file alias="components/VPNButtonBase.qml">../../gui/components/VPNButtonBase.qml</file>
|
||||||
|
<file alias="components/VPNMouseArea.qml">../../gui/components/VPNMouseArea.qml</file>
|
||||||
|
<file alias="components/VerticalSpacer.qml">../../gui/components/VerticalSpacer.qml</file>
|
||||||
|
<file alias="components/Icon.qml">../../gui/components/Icon.qml</file>
|
||||||
|
<file alias="components/VPNState.qml">../../gui/components/VPNState.qml</file>
|
||||||
|
<file alias="components/InitErrors.qml">../../gui/components/InitErrors.qml</file>
|
||||||
|
<file alias="components/ErrorBox.qml">../../gui/components/ErrorBox.qml</file>
|
||||||
|
<file alias="components/MotdBox.qml">../../gui/components/MotdBox.qml</file>
|
||||||
|
<file alias="resources/icon-noshield.svg">../../gui/resources/icon-noshield.svg</file>
|
||||||
|
<file alias="resources/location.svg">../../gui/resources/location.svg</file>
|
||||||
|
<file alias="resources/settings.svg">../../gui/resources/settings.svg</file>
|
||||||
|
<file alias="resources/power.svg">../../gui/resources/power.svg</file>
|
||||||
|
<file alias="resources/language.svg">../../gui/resources/language.svg</file>
|
||||||
|
<file alias="resources/lightning.svg">../../gui/resources/lightning.svg</file>
|
||||||
|
<file alias="resources/close.svg">../../gui/resources/close.svg</file>
|
||||||
|
<file alias="resources/donate.svg">../../gui/resources/donate.svg</file>
|
||||||
|
<file alias="resources/tools.svg">../../gui/resources/tools.svg</file>
|
||||||
|
<file alias="resources/help.svg">../../gui/resources/help.svg</file>
|
||||||
|
<file alias="resources/about.svg">../../gui/resources/about.svg</file>
|
||||||
|
<file alias="resources/bridge.svg">../../gui/resources/bridge.svg</file>
|
||||||
|
<file alias="resources/gear-fill.svg">../../gui/resources/gear-fill.svg</file>
|
||||||
|
<file alias="resources/reception-0.svg">../../gui/resources/reception-0.svg</file>
|
||||||
|
<file alias="resources/reception-2.svg">../../gui/resources/reception-2.svg</file>
|
||||||
|
<file alias="resources/reception-4.svg">../../gui/resources/reception-4.svg</file>
|
||||||
|
<file alias="resources/reception-0@24.svg">../../gui/resources/reception-0@24.svg</file>
|
||||||
|
<file alias="resources/reception-4@24.svg">../../gui/resources/reception-4@24.svg</file>
|
||||||
|
<file alias="resources/arrow-left.svg">../../gui/resources/arrow-left.svg</file>
|
||||||
|
<file alias="resources/globe.svg">../../gui/resources/globe.svg</file>
|
||||||
|
<file alias="resources/spy.gif">../../gui/resources/spy.gif</file>
|
||||||
|
<file alias="resources/quit.svg">../../gui/resources/quit.svg</file>
|
||||||
|
<file alias="resources/alert.svg">../../gui/resources/alert.svg</file>
|
||||||
|
<file alias="resources/angle-right.svg">../../gui/resources/angle-right.svg</file>
|
||||||
|
<file alias="resources/snowflake.svg">../../gui/resources/snowflake.svg</file>
|
||||||
|
<file alias="resources/button_green.png">../../gui/resources/button_green.png</file>
|
||||||
|
<file alias="resources/button_yellow.png">../../gui/resources/button_yellow.png</file>
|
||||||
|
<file alias="resources/button_red.png">../../gui/resources/button_red.png</file>
|
||||||
|
<file alias="resources/ravens.svg">../../gui/resources/ravens.svg</file>
|
||||||
|
<file alias="resources/ravens.gif">../../gui/resources/ravens.gif</file>
|
||||||
|
<file alias="resources/riseup-icon.svg">../../gui/resources/riseup-icon.svg</file>
|
||||||
|
<file alias="resources/riseup_connected_bg.png">../../gui/resources/riseup_connected_bg.png</file>
|
||||||
|
<file alias="resources/riseup_connecting_bg.png">../../gui/resources/riseup_connecting_bg.png</file>
|
||||||
|
<file alias="resources/riseup_disconnected_bg.png">../../gui/resources/riseup_disconnected_bg.png</file>
|
||||||
|
<file alias="resources/riseup_green_shield.svg">../../gui/resources/riseup_green_shield.svg</file>
|
||||||
|
<file alias="resources/calyx/calyx-shield-green.png">../../gui/resources/calyx/calyx-shield-green.png</file>
|
||||||
|
<file alias="resources/calyx/calyx-hand.png">../../gui/resources/calyx/calyx-hand.png</file>
|
||||||
|
<file alias="resources/calyx/calyx-red-shield.png">../../gui/resources/calyx/calyx-red-shield.png</file>
|
||||||
|
<file alias="resources/calyx/calyx-yellow-shield.png">../../gui/resources/calyx/calyx-yellow-shield.png</file>
|
||||||
|
<file alias="resources/bitmask/splash_logo.png">../../gui/resources/bitmask/splash_logo.png</file>
|
||||||
|
<file alias="resources/bitmask/state_connected.png">../../gui/resources/bitmask/state_connected.png</file>
|
||||||
|
<file alias="resources/bitmask/state_connecting.png">../../gui/resources/bitmask/state_connecting.png</file>
|
||||||
|
<file alias="resources/bitmask/state_disconnected.png">../../gui/resources/bitmask/state_disconnected.png</file>
|
||||||
|
<file alias="resources/bitmask/bitmask_connected_bg.png">../../gui/resources/bitmask/bitmask_connected_bg.png</file>
|
||||||
|
<file alias="resources/bitmask/bitmask_connecting_bg.png">../../gui/resources/bitmask/bitmask_connecting_bg.png</file>
|
||||||
|
<file alias="resources/bitmask/bitmask_disconnected_bg.png">../../gui/resources/bitmask/bitmask_disconnected_bg.png</file>
|
||||||
|
<file alias="poppins-regular.ttf">../../gui/resources/fonts/Poppins-Regular.ttf</file>
|
||||||
|
<file alias="poppins-bold.ttf">../../gui/resources/fonts/Poppins-Bold.ttf</file>
|
||||||
|
<file alias="monserrat-bold.ttf">../../gui/resources/fonts/Montserrat-SemiBold.ttf</file>
|
||||||
|
<file alias="roboto.ttf">../../gui/resources/fonts/Roboto-Regular.ttf</file>
|
||||||
|
<file alias="roboto-bold.ttf">../../gui/resources/fonts/Roboto-Bold.ttf</file>
|
||||||
|
<file alias="assets/icon/png/black/vpn_off.png">../../gui/assets/icon/png/black/vpn_off.png</file>
|
||||||
|
<file alias="assets/icon/png/black/vpn_on.png">../../gui/assets/icon/png/black/vpn_on.png</file>
|
||||||
|
<file alias="assets/icon/png/black/vpn_wait_0.png">../../gui/assets/icon/png/black/vpn_wait_0.png</file>
|
||||||
|
<file alias="assets/icon/png/black/vpn_wait_1.png">../../gui/assets/icon/png/black/vpn_wait_1.png</file>
|
||||||
|
<file alias="assets/icon/png/black/vpn_wait_2.png">../../gui/assets/icon/png/black/vpn_wait_2.png</file>
|
||||||
|
<file alias="assets/icon/png/black/vpn_wait_3.png">../../gui/assets/icon/png/black/vpn_wait_3.png</file>
|
||||||
|
<file alias="assets/icon/png/white/vpn_off.png">../../gui/assets/icon/png/white/vpn_off.png</file>
|
||||||
|
<file alias="assets/icon/png/white/vpn_on.png">../../gui/assets/icon/png/white/vpn_on.png</file>
|
||||||
|
<file alias="assets/icon/png/white/vpn_wait_0.png">../../gui/assets/icon/png/white/vpn_wait_0.png</file>
|
||||||
|
<file alias="assets/icon/png/white/vpn_wait_1.png">../../gui/assets/icon/png/white/vpn_wait_1.png</file>
|
||||||
|
<file alias="assets/icon/png/white/vpn_wait_2.png">../../gui/assets/icon/png/white/vpn_wait_2.png</file>
|
||||||
|
<file alias="assets/icon/png/white/vpn_wait_3.png">../../gui/assets/icon/png/white/vpn_wait_3.png</file>
|
||||||
|
<file alias="assets/img/bird.jpg">../../gui/assets/img/bird.jpg</file>
|
||||||
|
<file alias="providers.json">../../gui/providers/providers.json</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
@ -11631,7 +11631,7 @@ with pkgs;
|
|||||||
|
|
||||||
ripdrag = callPackage ../tools/misc/ripdrag { };
|
ripdrag = callPackage ../tools/misc/ripdrag { };
|
||||||
|
|
||||||
riseup-vpn = libsForQt5.callPackage ../tools/networking/bitmask-vpn {
|
riseup-vpn = qt6Packages.callPackage ../tools/networking/bitmask-vpn {
|
||||||
provider = "riseup";
|
provider = "riseup";
|
||||||
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user