eddie: init at 2.24.4 (#332532)
This commit is contained in:
11
pkgs/by-name/ed/eddie/deps.nix
generated
Normal file
11
pkgs/by-name/ed/eddie/deps.nix
generated
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# This file was automatically generated by passthru.fetch-deps.
|
||||||
|
# Please dont edit it manually, your changes might get overwritten!
|
||||||
|
|
||||||
|
{ fetchNuGet }:
|
||||||
|
[
|
||||||
|
(fetchNuGet {
|
||||||
|
pname = "Microsoft.CSharp";
|
||||||
|
version = "4.7.0";
|
||||||
|
hash = "sha256-Enknv2RsFF68lEPdrf5M+BpV1kHoLTVRApKUwuk/pj0=";
|
||||||
|
})
|
||||||
|
]
|
||||||
24
pkgs/by-name/ed/eddie/dont-set-rpath-in-eddie-tray.patch
Normal file
24
pkgs/by-name/ed/eddie/dont-set-rpath-in-eddie-tray.patch
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
From 7e7d03d09990cf8e17091572258f12b77a661d74 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Sobolev <contact@paveloom.dev>
|
||||||
|
Date: Fri, 6 Dec 2024 22:42:40 +0300
|
||||||
|
Subject: [PATCH 2/2] Don't set `RPATH` in `eddie-tray`.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/App.Forms.Linux.Tray/build.sh | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/App.Forms.Linux.Tray/build.sh b/src/App.Forms.Linux.Tray/build.sh
|
||||||
|
index 771b2c7..bc1093c 100755
|
||||||
|
--- a/src/App.Forms.Linux.Tray/build.sh
|
||||||
|
+++ b/src/App.Forms.Linux.Tray/build.sh
|
||||||
|
@@ -35,7 +35,6 @@ g++ "$BASEPATH/main.cpp" -fPIC -o "$BASEPATH/bin/eddie-tray" `pkg-config --cflag
|
||||||
|
|
||||||
|
strip -S --strip-unneeded "$BASEPATH/bin/eddie-tray"
|
||||||
|
chmod a+x "$BASEPATH/bin/eddie-tray"
|
||||||
|
-patchelf --set-rpath '$ORIGIN' "$BASEPATH/bin/eddie-tray"
|
||||||
|
|
||||||
|
echo "Building eddie-tray - Done"
|
||||||
|
exit 0
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
||||||
144
pkgs/by-name/ed/eddie/package.nix
Normal file
144
pkgs/by-name/ed/eddie/package.nix
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildDotnetModule,
|
||||||
|
fetchFromGitHub,
|
||||||
|
dotnetCorePackages,
|
||||||
|
|
||||||
|
gcc,
|
||||||
|
makeWrapper,
|
||||||
|
msbuild,
|
||||||
|
pkg-config,
|
||||||
|
|
||||||
|
curl,
|
||||||
|
gtk3,
|
||||||
|
libayatana-appindicator,
|
||||||
|
|
||||||
|
openssh,
|
||||||
|
openvpn,
|
||||||
|
stunnel,
|
||||||
|
|
||||||
|
gtk2,
|
||||||
|
libayatana-indicator,
|
||||||
|
|
||||||
|
mono,
|
||||||
|
|
||||||
|
eddie,
|
||||||
|
testers,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildDotnetModule rec {
|
||||||
|
pname = "eddie";
|
||||||
|
version = "2.24.4";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "AirVPN";
|
||||||
|
repo = "Eddie";
|
||||||
|
# Upstream uses the summaries of commits for
|
||||||
|
# specifying the versions of experimental builds
|
||||||
|
rev = "aeaa7e594d71610dd2c231a8dc5c5aaddc89a7c1";
|
||||||
|
hash = "sha256-AlnWqrKoZb4s4MfPClxlEqzKIOwWL/frA+dx2kCNwW4=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./dont-set-rpath-in-eddie-tray.patch
|
||||||
|
./remove-the-postbuild-from-the-project-file.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
projectFile = [ "src/App.CLI.Linux/App.CLI.Linux.net8.csproj" ];
|
||||||
|
nugetDeps = ./deps.nix;
|
||||||
|
|
||||||
|
dotnet-sdk = dotnetCorePackages.sdk_8_0;
|
||||||
|
dotnet-runtime = dotnetCorePackages.runtime_8_0;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
gcc
|
||||||
|
makeWrapper
|
||||||
|
msbuild
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
curl
|
||||||
|
gtk3
|
||||||
|
libayatana-appindicator
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeRuntimeInputs = lib.makeBinPath [
|
||||||
|
openssh
|
||||||
|
openvpn
|
||||||
|
stunnel
|
||||||
|
];
|
||||||
|
|
||||||
|
runtimeInputs = lib.makeLibraryPath [
|
||||||
|
gtk2
|
||||||
|
gtk3
|
||||||
|
libayatana-indicator
|
||||||
|
];
|
||||||
|
|
||||||
|
makeWrapperArgs = [
|
||||||
|
"--add-flags \"--path.resources=${placeholder "out"}/share/eddie-ui\""
|
||||||
|
"--prefix PATH : ${nativeRuntimeInputs}"
|
||||||
|
];
|
||||||
|
|
||||||
|
executables = [ "eddie-cli" ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs src
|
||||||
|
'';
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
src/App.CLI.Linux.Elevated/build.sh Release
|
||||||
|
src/Lib.Platform.Linux.Native/build.sh Release
|
||||||
|
src/App.Forms.Linux.Tray/build.sh Release
|
||||||
|
|
||||||
|
msbuild \
|
||||||
|
-v:minimal \
|
||||||
|
-p:Configuration=Release \
|
||||||
|
-p:TargetFrameworkVersion=v4.8 \
|
||||||
|
-p:DefineConstants="EDDIEMONO4LINUX" \
|
||||||
|
src/App.Forms.Linux/App.Forms.Linux.sln
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/lib/eddie-ui
|
||||||
|
mkdir -p $out/share/{applications,eddie-ui}
|
||||||
|
|
||||||
|
cp src/App.CLI.Linux.Elevated/bin/eddie-cli-elevated $out/lib/eddie-ui
|
||||||
|
cp src/Lib.Platform.Linux.Native/bin/libLib.Platform.Linux.Native.so $out/lib/eddie-ui
|
||||||
|
cp src/App.Forms.Linux.Tray/bin/eddie-tray $out/lib/eddie-ui
|
||||||
|
|
||||||
|
ln -s $out/lib/eddie-ui/eddie-cli-elevated $out/lib/eddie/eddie-cli-elevated
|
||||||
|
ln -s $out/lib/eddie-ui/libLib.Platform.Linux.Native.so $out/lib/eddie/Lib.Platform.Linux.Native.so
|
||||||
|
|
||||||
|
cp -r src/App.Forms.Linux/bin/*/Release/* $out/lib/eddie-ui
|
||||||
|
chmod +x $out/lib/eddie-ui/App.Forms.Linux.exe
|
||||||
|
|
||||||
|
cp -r resources/* $out/share/eddie-ui
|
||||||
|
cp -r repository/linux_arch/bundle/eddie-ui/usr/share/{applications,pixmaps,polkit-1} $out/share
|
||||||
|
|
||||||
|
substituteInPlace \
|
||||||
|
$out/share/{applications/eddie-ui.desktop,polkit-1/actions/org.airvpn.eddie.ui.elevated.policy} \
|
||||||
|
--replace-fail /usr $out
|
||||||
|
|
||||||
|
makeWrapper "${mono}/bin/mono" $out/bin/eddie-ui \
|
||||||
|
--add-flags $out/lib/eddie-ui/App.Forms.Linux.exe \
|
||||||
|
--prefix LD_LIBRARY_PATH : ${runtimeInputs} \
|
||||||
|
''${makeWrapperArgs[@]}
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
tests.version = testers.testVersion {
|
||||||
|
package = eddie;
|
||||||
|
command = "eddie-cli version.short";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "AirVPN's OpenVPN and WireGuard wrapper";
|
||||||
|
homepage = "https://eddie.website";
|
||||||
|
license = lib.licenses.gpl3Plus;
|
||||||
|
mainProgram = "eddie-ui";
|
||||||
|
maintainers = with lib.maintainers; [ paveloom ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
From bfe8a4e0d75b97cf646818bfba52dfdbc3c4274c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pavel Sobolev <contact@paveloom.dev>
|
||||||
|
Date: Fri, 6 Dec 2024 22:42:40 +0300
|
||||||
|
Subject: [PATCH 1/2] Remove the postbuild from the project file.
|
||||||
|
|
||||||
|
---
|
||||||
|
src/App.CLI.Linux/App.CLI.Linux.net8.csproj | 5 -----
|
||||||
|
1 file changed, 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/App.CLI.Linux/App.CLI.Linux.net8.csproj b/src/App.CLI.Linux/App.CLI.Linux.net8.csproj
|
||||||
|
index 8d53d36..b4b3822 100644
|
||||||
|
--- a/src/App.CLI.Linux/App.CLI.Linux.net8.csproj
|
||||||
|
+++ b/src/App.CLI.Linux/App.CLI.Linux.net8.csproj
|
||||||
|
@@ -50,9 +50,4 @@
|
||||||
|
<ProjectReference Include="..\Lib.Core\Lib.Core.net8.csproj" />
|
||||||
|
<ProjectReference Include="..\Lib.Platform.Linux\Lib.Platform.Linux.net8.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
-
|
||||||
|
- <Target Name="LinuxPostBuild" AfterTargets="PostBuildEvent">
|
||||||
|
- <Exec Command="$(ProjectDir)/postbuild.sh "$(TargetDir)" $(RuntimeIdentifier) $(ConfigurationName)" />
|
||||||
|
- </Target>
|
||||||
|
-
|
||||||
|
</Project>
|
||||||
|
\ No newline at end of file
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
||||||
Reference in New Issue
Block a user