v2rayn: 7.3.1 -> 7.3.2 (#365384)

This commit is contained in:
Aleksana
2024-12-17 19:12:36 +08:00
committed by GitHub
2 changed files with 40 additions and 31 deletions
+16 -6
View File
@@ -85,8 +85,8 @@
})
(fetchNuGet {
pname = "CliWrap";
version = "3.6.7";
hash = "sha256-9j3GILP25inLJoQe0E8sF8egVt8ISqEQBGdIShev4Mk=";
version = "3.7.0";
hash = "sha256-hXClLGuhscCrcBaymrp57Prh4m8Qe0vdE4S2ErIM13w=";
})
(fetchNuGet {
pname = "DialogHost.Avalonia";
@@ -180,13 +180,13 @@
})
(fetchNuGet {
pname = "Semi.Avalonia";
version = "11.2.1.1";
hash = "sha256-SG3MQHk1J/ktdRn1GXF3AOXvhgl3S6hcIwhmFU4sWU4=";
version = "11.2.1.2";
hash = "sha256-64eayKF+P3qrUZIOOVliqnZ8zK7ZCCxFz1RkD5kJSxM=";
})
(fetchNuGet {
pname = "Semi.Avalonia.DataGrid";
version = "11.2.1.1";
hash = "sha256-LH1Yjg9JkFdH8VEYXXBaKi9jvjCAXYoJkTWCJEoIMHM=";
version = "11.2.1.2";
hash = "sha256-zEEmBjgksVgv9qwnKAFfDhDkrHphKe1/836Ax1gyazc=";
})
(fetchNuGet {
pname = "SkiaSharp";
@@ -288,6 +288,11 @@
version = "2.1.2";
hash = "sha256-e56+FgxEHqV3SGQx0ZAqzlscPxNUPXJ8Ls9rtqET1S4=";
})
(fetchNuGet {
pname = "System.CodeDom";
version = "9.0.0";
hash = "sha256-578lcBgswW0eM16r0EnJzfGodPx86RxxFoZHc2PSzsw=";
})
(fetchNuGet {
pname = "System.Collections.Immutable";
version = "8.0.0";
@@ -308,6 +313,11 @@
version = "8.0.0";
hash = "sha256-LdpB1s4vQzsOODaxiKstLks57X9DTD5D6cPx8DE1wwE=";
})
(fetchNuGet {
pname = "System.Management";
version = "9.0.0";
hash = "sha256-UyLO5dgNVC7rBT1S6o/Ix6EQGlVTSWUQtVC+/cyTkfQ=";
})
(fetchNuGet {
pname = "System.Memory";
version = "4.5.3";
+24 -25
View File
@@ -11,31 +11,20 @@
openssl,
lttng-ust_2_12,
krb5,
wrapGAppsHook4,
imagemagick,
makeDesktopItem,
copyDesktopItems,
bash,
}:
let
selectSystem =
attrs:
attrs.${stdenv.hostPlatform.system}
or (throw "v2rayn: ${stdenv.hostPlatform.system} is not supported");
arch = selectSystem {
x86_64-linux = "linux-x64";
aarch64-linux = "linux-arm64";
};
in
buildDotnetModule rec {
pname = "v2rayn";
version = "7.3.1";
version = "7.3.2";
src = fetchFromGitHub {
owner = "2dust";
repo = "v2rayN";
tag = version;
hash = "sha256-K5u8+zaXcDn4aytsgYFhhzG3xzLgoks5dnWuVk/6cS4=";
hash = "sha256-mWfWpleUVbq6Z31oh6QoG0j9eT3d7yF6z7e4lRe6+cM=";
};
projectFile = "v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj";
@@ -49,12 +38,12 @@ buildDotnetModule rec {
--replace-fail "return AppDomain.CurrentDomain.BaseDirectory;" 'return Path.Combine(Environment.GetEnvironmentVariable("XDG_DATA_HOME") ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "share"), "v2rayn");'
substituteInPlace v2rayN/ServiceLib/Common/Utils.cs \
--replace-fail "/bin/bash" "${bash}/bin/bash"
substituteInPlace v2rayN/ServiceLib/ServiceLib.csproj \
--replace-fail "0.16.20" "0.16.14"
'';
dotnetInstallFlags = [ "-p:PublishReadyToRun=false" ];
selfContainedBuild = true;
dotnet-sdk = dotnetCorePackages.sdk_8_0;
dotnet-runtime = dotnetCorePackages.runtime_8_0;
@@ -62,10 +51,9 @@ buildDotnetModule rec {
executables = [ "v2rayN" ];
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook4
copyDesktopItems
imagemagick
copyDesktopItems
autoPatchelfHook
];
buildInputs = [
@@ -73,17 +61,28 @@ buildDotnetModule rec {
fontconfig
icu
openssl
lttng-ust_2_12
krb5
lttng-ust_2_12
(lib.getLib stdenv.cc.cc)
];
postBuild = ''
mv ./v2rayN/v2rayN.Desktop/bin/Release/net8.0/${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/${arch}
'';
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 {