Skip to content

Commit

Permalink
v2rayn: 7.4.2 -> 7.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aucub committed Dec 30, 2024
1 parent a2993b4 commit 1369b42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 26 deletions.
4 changes: 2 additions & 2 deletions pkgs/by-name/v2/v2rayn/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 9 additions & 24 deletions pkgs/by-name/v2/v2rayn/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@
openssl,
lttng-ust_2_12,
krb5,
imagemagick,
makeDesktopItem,
copyDesktopItems,
bash,
xorg,
}:
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";
Expand All @@ -50,7 +49,6 @@ buildDotnetModule rec {
executables = [ "v2rayN" ];

nativeBuildInputs = [
imagemagick
copyDesktopItems
autoPatchelfHook
];
Expand All @@ -75,37 +73,24 @@ 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";
exec = "v2rayN";
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
'';

meta = {
Expand Down

0 comments on commit 1369b42

Please sign in to comment.