From 6abc676b170091e6db0ef83fc34eb18f38957301 Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Tue, 24 Dec 2024 17:11:53 +0800 Subject: [PATCH 1/9] v2rayn: add update script --- pkgs/by-name/v2/v2rayn/package.nix | 4 +++- pkgs/by-name/v2/v2rayn/update.sh | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 pkgs/by-name/v2/v2rayn/update.sh diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index e0a13d03aeddc..bd740faece70c 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -37,7 +37,7 @@ buildDotnetModule rec { --replace-fail "/bin/bash" "${bash}/bin/bash" ''; - dotnetInstallFlags = [ "-p:PublishReadyToRun=false" ]; + dotnetBuildFlags = [ "-p:PublishReadyToRun=false" ]; dotnet-sdk = dotnetCorePackages.sdk_8_0; @@ -104,6 +104,8 @@ buildDotnetModule rec { magick "v2rayN/v2rayN.Desktop/Assets/v2rayN.ico[11]" $out/share/pixmaps/v2rayn.png ''; + passthru.updateScript = ./update.sh; + meta = { description = "GUI client for Windows and Linux, support Xray core and sing-box-core and others"; homepage = "https://github.com/2dust/v2rayN"; diff --git a/pkgs/by-name/v2/v2rayn/update.sh b/pkgs/by-name/v2/v2rayn/update.sh new file mode 100755 index 0000000000000..b8356be9f83c3 --- /dev/null +++ b/pkgs/by-name/v2/v2rayn/update.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env nix-shell +#!nix-shell -i bash -p bash nix nix-update + +set -eou pipefail + +nix-update v2rayn + +$(nix-build -A v2rayn.fetch-deps) From 05330527607055a4bb2ea95efb7d60245e23173c Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Tue, 24 Dec 2024 09:17:35 +0000 Subject: [PATCH 2/9] v2rayn: 7.4.1 -> 7.4.2 --- pkgs/by-name/v2/v2rayn/deps.json | 56 +++++++++++++++--------------- pkgs/by-name/v2/v2rayn/package.nix | 6 ++-- 2 files changed, 32 insertions(+), 30 deletions(-) diff --git a/pkgs/by-name/v2/v2rayn/deps.json b/pkgs/by-name/v2/v2rayn/deps.json index ac4af1f2ad22b..36e2cfb6a7d6d 100644 --- a/pkgs/by-name/v2/v2rayn/deps.json +++ b/pkgs/by-name/v2/v2rayn/deps.json @@ -1,8 +1,8 @@ [ { "pname": "Avalonia", - "version": "11.2.2", - "hash": "sha256-lYWqgjYOyh4pg+TdkgqeFhi8OMI1p9IOvSntVXo5zvE=" + "version": "11.2.3", + "hash": "sha256-NUoyXJkIsgbkcKFVb10VRafM4ViHs801c/7vhu3ssUY=" }, { "pname": "Avalonia.Angle.Windows.Natives", @@ -16,68 +16,68 @@ }, { "pname": "Avalonia.Controls.ColorPicker", - "version": "11.2.2", - "hash": "sha256-Mmp7Mjy9Y6uvkfjE8KLWoJWcVZHiJwqmhQupsxYRExo=" + "version": "11.2.3", + "hash": "sha256-z3ZHxVSOoOjqq+5G71jnGN1Y0i3YpAkox7cj3lNr6kg=" }, { "pname": "Avalonia.Controls.DataGrid", - "version": "11.2.2", - "hash": "sha256-RbkISZEp55N9dtqvPp0Ej2/wpU/YzI4wgJjBCJnIGl4=" + "version": "11.2.3", + "hash": "sha256-jIJvuYN0iym/WeOC0C7z5xj5kCZSXGoeLQ/q5qQfewM=" }, { "pname": "Avalonia.Desktop", - "version": "11.2.2", - "hash": "sha256-ucd2SH0CAjwE5TSgwhhzYZqMD1zuTlR7qLQDl3mYGvg=" + "version": "11.2.3", + "hash": "sha256-srtZi+kDbhRtMl33l91zssBWETU5oHodKbbWyfEsb/I=" }, { "pname": "Avalonia.Diagnostics", - "version": "11.2.2", - "hash": "sha256-aOji+/TYSP0l3dpn62bvWMdce2YkYi5xzRPC3nS6ZGc=" + "version": "11.2.3", + "hash": "sha256-DIGkaBff+C3BLwedw5xteR5lfzb6ecxiLt12eJVgLQc=" }, { "pname": "Avalonia.Fonts.Inter", - "version": "11.2.2", - "hash": "sha256-H1h+PQBW8vrvJnKQZ+vcFaxCVssBcuHGBQw1Jj8dMR0=" + "version": "11.2.3", + "hash": "sha256-ySsCXVpjqjCX/uYkwluSfrAoBtuq9k7fC1bFjxKC9/Q=" }, { "pname": "Avalonia.FreeDesktop", - "version": "11.2.2", - "hash": "sha256-c/u6TX1Hl2h8B5xe7Zo1AJ6cR5BazI19NRnw56a36y0=" + "version": "11.2.3", + "hash": "sha256-3sNemBmZE06w2ul87T5HrEeHUxXMOa9MfQhpI4AoxDY=" }, { "pname": "Avalonia.Native", - "version": "11.2.2", - "hash": "sha256-2Scuc+OCtfLChDYCi4feCh9XUrgJpbVaek3xRnpOGDE=" + "version": "11.2.3", + "hash": "sha256-2Gp98NGWcrILqF+P5PDMPRdsMby/lZiT3eWAUskFim8=" }, { "pname": "Avalonia.ReactiveUI", - "version": "11.2.2", - "hash": "sha256-Rr/wmmS47korAK0nAplpWCWrS1O9YZZD6i+efR7btN0=" + "version": "11.2.3", + "hash": "sha256-NqRetBiFg5gNCS8C0J1JJJsZ4sz+w+GoEegGFddBGDg=" }, { "pname": "Avalonia.Remote.Protocol", - "version": "11.2.2", - "hash": "sha256-lMb3VvHXQGxn0dyEGkzKXxFocvPJUaNnOpRJpHF9ORU=" + "version": "11.2.3", + "hash": "sha256-dSeu7rnTD9rIvlyro2iFS52oi0vvfeaGV3kDm90BkKw=" }, { "pname": "Avalonia.Skia", - "version": "11.2.2", - "hash": "sha256-YmOT+r4OfyOyg8epho6bVaEW2HImEfsZ5rNqhWIY5Fk=" + "version": "11.2.3", + "hash": "sha256-QBp8wTA92hGwbmNSVL4gsjrqA9CfwDPgdTiOEqcogGA=" }, { "pname": "Avalonia.Themes.Simple", - "version": "11.2.2", - "hash": "sha256-HXkfpUuTN8hSBMXCCGW78+2GC5w3VdTUp1qm7HvUZPI=" + "version": "11.2.3", + "hash": "sha256-UF15yTDzHmqd33siH3TJxmxaonA51dzga+hmCUahn1k=" }, { "pname": "Avalonia.Win32", - "version": "11.2.2", - "hash": "sha256-pouvlprL9VeEi1dG5zR6nFj+I/4CIjH1rHbV3N9/FHg=" + "version": "11.2.3", + "hash": "sha256-xKFKObvqdJaQjphEktRJvzmAoDEsKg3WqlEG31V3qLE=" }, { "pname": "Avalonia.X11", - "version": "11.2.2", - "hash": "sha256-86EIfm1zEvKleliP58xAs7KGxP/n7x2m8ca8C9W1XqA=" + "version": "11.2.3", + "hash": "sha256-SD4dmpKx4l8YOyUnrA0fnf2Bb+tHSNyARh7GAtHyg60=" }, { "pname": "CliWrap", diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index bd740faece70c..47db1d6d77076 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -19,13 +19,13 @@ }: buildDotnetModule rec { pname = "v2rayn"; - version = "7.4.1"; + version = "7.4.2"; src = fetchFromGitHub { owner = "2dust"; repo = "v2rayN"; tag = version; - hash = "sha256-mtmuEwZy72LPYFf7hzE8TYiSh2kK6xe2CRdkOSbg2h4="; + hash = "sha256-2L/c0HpHqlRxVBfP4N+lrYs6FWDK9mLpJdSPf+tV+lc="; }; projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"; @@ -35,6 +35,8 @@ buildDotnetModule rec { postPatch = '' substituteInPlace v2rayN/ServiceLib/Common/Utils.cs \ --replace-fail "/bin/bash" "${bash}/bin/bash" + substituteInPlace v2rayN/ServiceLib/Handler/AutoStartupHandler.cs \ + --replace-fail "Utils.GetExePath())" '"${placeholder "out"}/bin/v2rayN")' ''; dotnetBuildFlags = [ "-p:PublishReadyToRun=false" ]; From 79d64f32591d3e7eede20f177c27f00f1e407c98 Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Tue, 31 Dec 2024 09:25:47 +0800 Subject: [PATCH 3/9] v2rayn: 7.4.2 -> 7.5.0 --- pkgs/by-name/v2/v2rayn/deps.json | 4 ++-- pkgs/by-name/v2/v2rayn/package.nix | 36 ++++++++++-------------------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/pkgs/by-name/v2/v2rayn/deps.json b/pkgs/by-name/v2/v2rayn/deps.json index 36e2cfb6a7d6d..bac9842e17e82 100644 --- a/pkgs/by-name/v2/v2rayn/deps.json +++ b/pkgs/by-name/v2/v2rayn/deps.json @@ -351,8 +351,8 @@ }, { "pname": "YamlDotNet", - "version": "16.2.1", - "hash": "sha256-Nu/rD43sihE4PTHC5r2Ua2gafclqcd2U95RcNFvGFhc=" + "version": "16.3.0", + "hash": "sha256-4Gi8wSQ8Rsi/3+LyegJr//A83nxn2fN8LN1wvSSp39Q=" }, { "pname": "ZXing.Net", diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index 47db1d6d77076..6aefa54af574f 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -11,21 +11,21 @@ openssl, lttng-ust_2_12, krb5, - imagemagick, makeDesktopItem, copyDesktopItems, bash, xorg, + xdg-utils, }: buildDotnetModule rec { pname = "v2rayn"; - version = "7.4.2"; + version = "7.5.0"; src = fetchFromGitHub { owner = "2dust"; repo = "v2rayN"; tag = version; - hash = "sha256-2L/c0HpHqlRxVBfP4N+lrYs6FWDK9mLpJdSPf+tV+lc="; + hash = "sha256-41vg8CFI5Y421w5J65vxgcHscap/IsiczITEFfLEoX8="; }; projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"; @@ -37,6 +37,8 @@ buildDotnetModule rec { --replace-fail "/bin/bash" "${bash}/bin/bash" substituteInPlace v2rayN/ServiceLib/Handler/AutoStartupHandler.cs \ --replace-fail "Utils.GetExePath())" '"${placeholder "out"}/bin/v2rayN")' + substituteInPlace v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs \ + --replace-fail "nautilus" "${xdg-utils}/bin/xdg-open" ''; dotnetBuildFlags = [ "-p:PublishReadyToRun=false" ]; @@ -48,7 +50,6 @@ buildDotnetModule rec { executables = [ "v2rayN" ]; nativeBuildInputs = [ - imagemagick copyDesktopItems autoPatchelfHook ]; @@ -73,24 +74,6 @@ buildDotnetModule rec { xorg.libXext ]; - postBuild = - let - selectSystem = - attrs: - attrs.${stdenv.hostPlatform.system} - or (throw "v2rayn: ${stdenv.hostPlatform.system} is not supported"); - arch = selectSystem { - x86_64-linux = "x64"; - aarch64-linux = "arm64"; - }; - in - '' - mv ./v2rayN/v2rayN.Desktop/bin/Release/net8.0/linux-${arch} ./v2rayN/v2rayN.Desktop/bin/Release/v2rayn - rm -r ./v2rayN/v2rayN.Desktop/bin/Release/net8.0 - mv ./v2rayN/v2rayN.Desktop/bin/Release/v2rayn ./v2rayN/v2rayN.Desktop/bin/Release/net8.0 - ln -s . ./v2rayN/v2rayN.Desktop/bin/Release/net8.0/linux-${arch} - ''; - desktopItems = [ (makeDesktopItem { name = "v2rayn"; @@ -98,12 +81,17 @@ buildDotnetModule rec { icon = "v2rayn"; genericName = "v2rayN"; desktopName = "v2rayN"; + categories = [ + "Network" + "Application" + ]; + terminal = false; + comment = "A GUI client for Windows and Linux, support Xray core and sing-box-core and others"; }) ]; postInstall = '' - mkdir -p $out/share/pixmaps - magick "v2rayN/v2rayN.Desktop/Assets/v2rayN.ico[11]" $out/share/pixmaps/v2rayn.png + install -Dm644 v2rayN/v2rayN.Desktop/v2rayN.png $out/share/pixmaps/v2rayn.png ''; passthru.updateScript = ./update.sh; From 4153c21ed7e51674901f445225fabd7134796f50 Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Wed, 1 Jan 2025 13:15:53 +0000 Subject: [PATCH 4/9] v2rayn: 7.5.0 -> 7.5.1 --- pkgs/by-name/v2/v2rayn/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index 6aefa54af574f..90965eeb7ba65 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -19,13 +19,13 @@ }: buildDotnetModule rec { pname = "v2rayn"; - version = "7.5.0"; + version = "7.5.1"; src = fetchFromGitHub { owner = "2dust"; repo = "v2rayN"; tag = version; - hash = "sha256-41vg8CFI5Y421w5J65vxgcHscap/IsiczITEFfLEoX8="; + hash = "sha256-IDFhFYI7zju7O2FPUUjDVhrYOZ6QRZSVLXPlDFMr87w="; }; projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"; From 3c95d55e54df38906341590facb6fdc242176a8b Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Sat, 4 Jan 2025 11:31:54 +0000 Subject: [PATCH 5/9] v2rayn: 7.5.1 -> 7.5.2 --- pkgs/by-name/v2/v2rayn/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index 90965eeb7ba65..b3f80053ad5a9 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -19,13 +19,13 @@ }: buildDotnetModule rec { pname = "v2rayn"; - version = "7.5.1"; + version = "7.5.2"; src = fetchFromGitHub { owner = "2dust"; repo = "v2rayN"; tag = version; - hash = "sha256-IDFhFYI7zju7O2FPUUjDVhrYOZ6QRZSVLXPlDFMr87w="; + hash = "sha256-g1e4U3BdPfsdjfQcxana3tKbAaqTpXND4FcPaf8WrmU="; }; projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"; From 7eb5dfbe6c0d9593f2ef8507270620b9bd08824e Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Sun, 5 Jan 2025 16:17:18 +0000 Subject: [PATCH 6/9] v2rayn: 7.5.2 -> 7.5.5 --- pkgs/by-name/v2/v2rayn/deps.json | 8 ++++---- pkgs/by-name/v2/v2rayn/package.nix | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/v2/v2rayn/deps.json b/pkgs/by-name/v2/v2rayn/deps.json index bac9842e17e82..5f222d833fade 100644 --- a/pkgs/by-name/v2/v2rayn/deps.json +++ b/pkgs/by-name/v2/v2rayn/deps.json @@ -176,13 +176,13 @@ }, { "pname": "Semi.Avalonia", - "version": "11.2.1.2", - "hash": "sha256-64eayKF+P3qrUZIOOVliqnZ8zK7ZCCxFz1RkD5kJSxM=" + "version": "11.2.1.3", + "hash": "sha256-AtJSFLa/zHk/58fJ+1h6IDowNDLTaRNUVaQ7lfQyYAw=" }, { "pname": "Semi.Avalonia.DataGrid", - "version": "11.2.1.2", - "hash": "sha256-zEEmBjgksVgv9qwnKAFfDhDkrHphKe1/836Ax1gyazc=" + "version": "11.2.1.3", + "hash": "sha256-CEjvrgPSxqubAQ6aOiag7SukA19WJ2s4G3zeLrk9810=" }, { "pname": "SkiaSharp", diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index b3f80053ad5a9..2b601e33bb12b 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -19,13 +19,13 @@ }: buildDotnetModule rec { pname = "v2rayn"; - version = "7.5.2"; + version = "7.5.5"; src = fetchFromGitHub { owner = "2dust"; repo = "v2rayN"; tag = version; - hash = "sha256-g1e4U3BdPfsdjfQcxana3tKbAaqTpXND4FcPaf8WrmU="; + hash = "sha256-/44RqnKb39BpO785hxZIjylqVes7wl5onZuZB2R2Ew4="; }; projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"; From f4b591ac1ede9970b34acf746e5bcd60f2aafdad Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:06:02 +0000 Subject: [PATCH 7/9] v2rayn: 7.5.5 -> 7.5.6 --- pkgs/by-name/v2/v2rayn/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index 2b601e33bb12b..7faf8bdc021dc 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -19,13 +19,13 @@ }: buildDotnetModule rec { pname = "v2rayn"; - version = "7.5.5"; + version = "7.5.6"; src = fetchFromGitHub { owner = "2dust"; repo = "v2rayN"; tag = version; - hash = "sha256-/44RqnKb39BpO785hxZIjylqVes7wl5onZuZB2R2Ew4="; + hash = "sha256-dm95gneMp7wEx2UqmMDN3ul3lmuT5anGgGrQOhPokFY="; }; projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"; From 84cfce1e5df8a35d7517964607ade56dc4ec5b4a Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Sat, 11 Jan 2025 15:11:58 +0000 Subject: [PATCH 8/9] v2rayn: 7.5.6 -> 7.6.0 --- pkgs/by-name/v2/v2rayn/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index 7faf8bdc021dc..1289725539493 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -19,13 +19,13 @@ }: buildDotnetModule rec { pname = "v2rayn"; - version = "7.5.6"; + version = "7.6.0"; src = fetchFromGitHub { owner = "2dust"; repo = "v2rayN"; tag = version; - hash = "sha256-dm95gneMp7wEx2UqmMDN3ul3lmuT5anGgGrQOhPokFY="; + hash = "sha256-NecB1BVbmN4pUU9YPruwom7CFyKt/npXCCEh3N8YbMo="; }; projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"; From 44cb81fdf045d6d2fa66a5fe4184a51b76809741 Mon Sep 17 00:00:00 2001 From: aucub <78630225+aucub@users.noreply.github.com> Date: Sun, 12 Jan 2025 23:23:03 +0800 Subject: [PATCH 9/9] v2rayn: 7.6.0 -> 7.6.1 --- pkgs/by-name/v2/v2rayn/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/v2/v2rayn/package.nix b/pkgs/by-name/v2/v2rayn/package.nix index 1289725539493..f6c4a2a64ae39 100644 --- a/pkgs/by-name/v2/v2rayn/package.nix +++ b/pkgs/by-name/v2/v2rayn/package.nix @@ -19,13 +19,13 @@ }: buildDotnetModule rec { pname = "v2rayn"; - version = "7.6.0"; + version = "7.6.1"; src = fetchFromGitHub { owner = "2dust"; repo = "v2rayN"; tag = version; - hash = "sha256-NecB1BVbmN4pUU9YPruwom7CFyKt/npXCCEh3N8YbMo="; + hash = "sha256-mpd9Krlmu/XgyEGMsuBLCP58/RgEQWcQWLMOmt0/7KM="; }; projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj";