ivpn*: 3.14.34 -> 3.15.0 (#467943)

This commit is contained in:
Sandro
2025-12-15 16:03:54 +00:00
committed by GitHub
6 changed files with 159 additions and 133 deletions
+102
View File
@@ -0,0 +1,102 @@
{
buildGoModule,
fetchFromGitHub,
lib,
wirelesstools,
makeWrapper,
wireguard-tools,
openvpn,
obfs4,
iproute2,
dnscrypt-proxy,
iptables,
gawk,
util-linux,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "ivpn-service";
version = "3.15.0";
buildInputs = [ wirelesstools ];
nativeBuildInputs = [ makeWrapper ];
src = fetchFromGitHub {
owner = "ivpn";
repo = "desktop-app";
tag = "v${finalAttrs.version}";
hash = "sha256-Y+oW/2WDkH/YydR+xSzEHPdCNKTmmsV4yEsju+OmDYE=";
};
modRoot = "daemon";
vendorHash = "sha256-DVKSCcEeE7vI8aOYuEwk22n0wtF7MMDOyAgYoXYadwI=";
proxyVendor = true; # .c file
patches = [ ./permissions.patch ];
postPatch = ''
substituteInPlace daemon/service/platform/platform_linux.go \
--replace 'openVpnBinaryPath = "/usr/sbin/openvpn"' \
'openVpnBinaryPath = "${openvpn}/bin/openvpn"' \
--replace 'routeCommand = "/sbin/ip route"' \
'routeCommand = "${iproute2}/bin/ip route"'
substituteInPlace daemon/netinfo/netinfo_linux.go \
--replace 'retErr := shell.ExecAndProcessOutput(log, outParse, "", "/sbin/ip", "route")' \
'retErr := shell.ExecAndProcessOutput(log, outParse, "", "${iproute2}/bin/ip", "route")'
substituteInPlace daemon/service/platform/platform_linux_release.go \
--replace 'installDir := "/opt/ivpn"' "installDir := \"$out\"" \
--replace 'obfsproxyStartScript = path.Join(installDir, "obfsproxy/obfs4proxy")' \
'obfsproxyStartScript = "${lib.getExe obfs4}"' \
--replace 'wgBinaryPath = path.Join(installDir, "wireguard-tools/wg-quick")' \
'wgBinaryPath = "${wireguard-tools}/bin/wg-quick"' \
--replace 'wgToolBinaryPath = path.Join(installDir, "wireguard-tools/wg")' \
'wgToolBinaryPath = "${wireguard-tools}/bin/wg"' \
--replace 'dnscryptproxyBinPath = path.Join(installDir, "dnscrypt-proxy/dnscrypt-proxy")' \
'dnscryptproxyBinPath = "${dnscrypt-proxy}/bin/dnscrypt-proxy"'
'';
ldflags = [
"-s"
"-w"
"-X github.com/ivpn/desktop-app/daemon/version._version=${finalAttrs.version}"
"-X github.com/ivpn/desktop-app/daemon/version._time=1970-01-01"
];
postInstall = ''
mv $out/bin/{daemon,ivpn-service}
'';
postFixup = ''
mkdir -p $out/etc
cp -r $src/daemon/References/Linux/etc/* $out/etc/
cp -r $src/daemon/References/common/etc/* $out/etc/
patchShebangs --build $out/etc/firewall.sh $out/etc/splittun.sh $out/etc/client.down $out/etc/client.up
wrapProgram "$out/bin/ivpn-service" \
--suffix PATH : ${
lib.makeBinPath [
iptables
gawk
util-linux
]
}
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Official IVPN Desktop app service daemon";
homepage = "https://www.ivpn.net/apps";
changelog = "https://github.com/ivpn/desktop-app/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
urandom
blenderfreaky
];
mainProgram = "ivpn-service";
};
})
+7 -10
View File
@@ -9,23 +9,20 @@
makeWrapper,
ivpn-service,
}:
let
version = "3.14.34";
in
buildNpmPackage {
buildNpmPackage (finalAttrs: {
pname = "ivpn-ui";
inherit version;
version = "3.15.0";
src = fetchFromGitHub {
owner = "ivpn";
repo = "desktop-app";
tag = "v${version}";
hash = "sha256-Q96G5mJahJnXxpqJ8IF0oFie7l0Nd1p8drHH9NSpwEw=";
tag = "v${finalAttrs.version}";
hash = "sha256-Y+oW/2WDkH/YydR+xSzEHPdCNKTmmsV4yEsju+OmDYE=";
};
sourceRoot = "source/ui";
npmDepsHash = "sha256-y/VxvSZUvcIuckJF87639i5pcVJLg8SDAbWmg5bO3/s=";
npmDepsHash = "sha256-OOBBUDJwTP2T/KqzJPRV+A9ncRmb14KBoAXqa0T6c58=";
nativeBuildInputs = [
copyDesktopItems
@@ -85,9 +82,9 @@ buildNpmPackage {
mainProgram = "ivpn-ui";
homepage = "https://www.ivpn.net";
downloadPage = "https://github.com/ivpn/desktop-app";
changelog = "https://github.com/ivpn/desktop-app/releases/tag/v${version}";
changelog = "https://github.com/ivpn/desktop-app/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ blenderfreaky ];
platforms = [ "x86_64-linux" ];
};
}
})
+50
View File
@@ -0,0 +1,50 @@
{
buildGoModule,
fetchFromGitHub,
lib,
wirelesstools,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "ivpn";
version = "3.15.0";
buildInputs = [ wirelesstools ];
src = fetchFromGitHub {
owner = "ivpn";
repo = "desktop-app";
tag = "v${finalAttrs.version}";
hash = "sha256-Y+oW/2WDkH/YydR+xSzEHPdCNKTmmsV4yEsju+OmDYE=";
};
modRoot = "cli";
vendorHash = "sha256-xZ1tMiv06fE2wtpDagKjHiVTPYWpj32hM6n/v9ZcgrE=";
proxyVendor = true; # .c file
ldflags = [
"-s"
"-w"
"-X github.com/ivpn/desktop-app/daemon/version._version=${finalAttrs.version}"
"-X github.com/ivpn/desktop-app/daemon/version._time=1970-01-01"
];
postInstall = ''
mv $out/bin/{cli,ivpn}
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Official IVPN Desktop app";
homepage = "https://www.ivpn.net/apps";
changelog = "https://github.com/ivpn/desktop-app/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
urandom
blenderfreaky
];
mainProgram = "ivpn";
};
})
-118
View File
@@ -1,118 +0,0 @@
{
buildGoModule,
fetchFromGitHub,
lib,
wirelesstools,
makeWrapper,
wireguard-tools,
openvpn,
obfs4,
iproute2,
dnscrypt-proxy,
iptables,
gawk,
util-linux,
nix-update-script,
}:
builtins.mapAttrs
(
pname: attrs:
buildGoModule (
attrs
// rec {
inherit pname;
version = "3.14.34";
buildInputs = [
wirelesstools
];
src = fetchFromGitHub {
owner = "ivpn";
repo = "desktop-app";
tag = "v${version}";
hash = "sha256-Q96G5mJahJnXxpqJ8IF0oFie7l0Nd1p8drHH9NSpwEw=";
};
proxyVendor = true; # .c file
ldflags = [
"-s"
"-w"
"-X github.com/ivpn/desktop-app/daemon/version._version=${version}"
"-X github.com/ivpn/desktop-app/daemon/version._time=1970-01-01"
];
postInstall = ''
mv $out/bin/{${attrs.modRoot},${pname}}
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Official IVPN Desktop app";
homepage = "https://www.ivpn.net/apps";
changelog = "https://github.com/ivpn/desktop-app/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
urandom
blenderfreaky
];
mainProgram = "ivpn";
};
}
)
)
{
ivpn = {
modRoot = "cli";
vendorHash = "sha256-xZ1tMiv06fE2wtpDagKjHiVTPYWpj32hM6n/v9ZcgrE=";
};
ivpn-service = {
modRoot = "daemon";
vendorHash = "sha256-DVKSCcEeE7vI8aOYuEwk22n0wtF7MMDOyAgYoXYadwI=";
nativeBuildInputs = [ makeWrapper ];
patches = [ ./permissions.patch ];
postPatch = ''
substituteInPlace daemon/service/platform/platform_linux.go \
--replace 'openVpnBinaryPath = "/usr/sbin/openvpn"' \
'openVpnBinaryPath = "${openvpn}/bin/openvpn"' \
--replace 'routeCommand = "/sbin/ip route"' \
'routeCommand = "${iproute2}/bin/ip route"'
substituteInPlace daemon/netinfo/netinfo_linux.go \
--replace 'retErr := shell.ExecAndProcessOutput(log, outParse, "", "/sbin/ip", "route")' \
'retErr := shell.ExecAndProcessOutput(log, outParse, "", "${iproute2}/bin/ip", "route")'
substituteInPlace daemon/service/platform/platform_linux_release.go \
--replace 'installDir := "/opt/ivpn"' "installDir := \"$out\"" \
--replace 'obfsproxyStartScript = path.Join(installDir, "obfsproxy/obfs4proxy")' \
'obfsproxyStartScript = "${lib.getExe obfs4}"' \
--replace 'wgBinaryPath = path.Join(installDir, "wireguard-tools/wg-quick")' \
'wgBinaryPath = "${wireguard-tools}/bin/wg-quick"' \
--replace 'wgToolBinaryPath = path.Join(installDir, "wireguard-tools/wg")' \
'wgToolBinaryPath = "${wireguard-tools}/bin/wg"' \
--replace 'dnscryptproxyBinPath = path.Join(installDir, "dnscrypt-proxy/dnscrypt-proxy")' \
'dnscryptproxyBinPath = "${dnscrypt-proxy}/bin/dnscrypt-proxy"'
'';
postFixup = ''
mkdir -p $out/etc
cp -r $src/daemon/References/Linux/etc/* $out/etc/
cp -r $src/daemon/References/common/etc/* $out/etc/
patchShebangs --build $out/etc/firewall.sh $out/etc/splittun.sh $out/etc/client.down $out/etc/client.up
wrapProgram "$out/bin/ivpn-service" \
--suffix PATH : ${
lib.makeBinPath [
iptables
gawk
util-linux
]
}
'';
};
}
-5
View File
@@ -1066,11 +1066,6 @@ with pkgs;
iroh-dns-server
;
inherit (callPackages ../tools/networking/ivpn/default.nix { })
ivpn
ivpn-service
;
kanata-with-cmd = kanata.override { withCmd = true; };
linux-router-without-wifi = linux-router.override { useWifiDependencies = false; };