Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eddie-ui: init at 2.20.0 #105195

Closed
wants to merge 2 commits into from
Closed

eddie-ui: init at 2.20.0 #105195

wants to merge 2 commits into from

Conversation

vanbeast
Copy link

Motivation for this change

#73233
Used build scripts for Arch as a reference.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • [X ] NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • [ X] Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Comment on lines 1 to 21
{ stdenv,
fetchFromGitHub,
clang,
cmake,
mono,
dotnet-sdk,
which,
glibc,
pkgconfig,
gtk2,
libappindicator-gtk2,
lzma,
libselinux,
libsepol,
fribidi,
libthai,
libdatrie,
xorg,
openvpn,
stunnel
}:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ stdenv,
fetchFromGitHub,
clang,
cmake,
mono,
dotnet-sdk,
which,
glibc,
pkgconfig,
gtk2,
libappindicator-gtk2,
lzma,
libselinux,
libsepol,
fribidi,
libthai,
libdatrie,
xorg,
openvpn,
stunnel
}:
{ stdenv
, fetchFromGitHub,
, clang
, cmake
....
}:

I am lazy now but the formatting should be like the above example.


stdenv.mkDerivation rec {
pname = "eddie-ui";
version = "2.18.9";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "2.18.9";
version = "2.18.9";

src = fetchFromGitHub {
owner = "AirVPN";
repo = "Eddie";
rev = "2.18.9";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rev = "2.18.9";
rev = version;

Otherwise we won't get auto updates.

rev = "2.18.9";
sha256 = "1nvnvy6lskydfrlsrbyk065hl6zxdyivhrynydny1kirz3qmrw61";
};
sourceRoot= "/build/source/src/UI.GTK.Linux.Tray";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sourceRoot= "/build/source/src/UI.GTK.Linux.Tray";

IIRC this is not required here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remove this line, I need to add
dontUseCmakeConfigure=true;
Otherwise I get the error:
CMake Error: The source directory "/build/source" does not appear to contain CMakeLists.txt.
Also, when I skip configure phase with the option above I have an error while building:

/build/source/src/UI.GTK.Linux.Tray/src/main.cpp:22:10: fatal error: libappindicator/app-indicator.h: No such file or directory
   22 | #include <libappindicator/app-indicator.h>

Looks like in this case I need to provide some cmake flags manually.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sourceRoot= "/build/source/src/UI.GTK.Linux.Tray";
sourceRoot= "src/UI.GTK.Linux.Tray";

This should be relative and not absolute.

Comment on lines 58 to 71
libselinux libsepol fribidi libthai libdatrie xorg.libXdmcp
];
installPhase = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
libselinux libsepol fribidi libthai libdatrie xorg.libXdmcp
];
installPhase = ''
libselinux libsepol fribidi libthai libdatrie xorg.libXdmcp
];
installPhase = ''

Comment on lines +65 to +78
cp repository/linux_arch/bundle/eddie-ui/usr/bin/eddie-ui $out/bin/eddie-ui
substituteInPlace $out/bin/eddie-ui --replace '/usr/' $out/
chmod +x $out/bin/eddie-ui
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cp repository/linux_arch/bundle/eddie-ui/usr/bin/eddie-ui $out/bin/eddie-ui
substituteInPlace $out/bin/eddie-ui --replace '/usr/' $out/
chmod +x $out/bin/eddie-ui
install -Dm755 repository/linux_arch/bundle/eddie-ui/usr/bin/eddie-ui $out/bin/eddie-ui
substituteInPlace $out/bin/eddie-ui --replace '/usr/' $out/

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding this part. I wanted to ask maybe there is a better way instead of copying Arch script. The script is:
mono /usr/lib/eddie-ui/eddie-ui.exe --path.resources=/usr/share/eddie-ui --path.exec="$0" "$@".
Can we use some Nix wrapper function here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure but it could be that the binary gets double wrapped.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makeWrapper has an --add-flags option which can do that.

Eddie - OpenVPN GUI, A VPN based on OpenVPN and operated by activists and hacktivists in defence of net neutrality, privacy and against censorship.
'';
homepage = "https://airvpn.org/";
changelog = "https://github.com/AirVPN/Eddie/compare/2.18.9...master";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
changelog = "https://github.com/AirVPN/Eddie/compare/2.18.9...master";
changelog = "https://github.com/AirVPN/Eddie/releases";

homepage = "https://airvpn.org/";
changelog = "https://github.com/AirVPN/Eddie/compare/2.18.9...master";
maintainers = with maintainers; [vanbeast];
license = licenses.gpl3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpl3 is deprecated. Please set gpl3Plus or gpl3Only.

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the merge conflict and do not merge master into PRs.

@@ -28675,4 +28675,6 @@ in

psftools = callPackage ../os-specific/linux/psftools {};

eddie-ui = callPackage ../applications/networking/eddie-ui/default.nix {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sort this into a fitting category and there alphabetically.

Suggested change
eddie-ui = callPackage ../applications/networking/eddie-ui/default.nix {};
eddie-ui = callPackage ../applications/networking/eddie-ui/default.nix { };

@vanbeast vanbeast changed the title eddie-ui: init at 2.18.9 eddie-ui: init at 2.20.0 Mar 19, 2021
@vanbeast
Copy link
Author

Hi @SuperSandro2000
Sorry, didn't have time to fix the PR. Now it's updated. Could you please check buildInputs and nativeBuildInputs? It needs mono, openvpn and stunnel at runtime. Is it correct to put them in buildInputs?

@vanbeast vanbeast force-pushed the eddieui-pkg branch 3 times, most recently from 554f2df to 1ab6510 Compare March 19, 2021 08:35
@vanbeast
Copy link
Author

@SuperSandro2000 Did some cleanup according to your comments. Please review

@@ -10924,4 +10924,10 @@
github = "zupo";
githubId = 311580;
};
vanbeast = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this into a separate commit with the message maintainers: add vanbeast.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean separate PR or just separate commit in this PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this into a separate commit with the message maintainers: add vanbeast and sort it alphabetically.

sha256 = "0wack2xc5vk2b5i6knhqqcppdc3cml1swys3kprdpazrcim79yvg";
};

buildInputs = [openvpn mono stunnel];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
buildInputs = [openvpn mono stunnel];
buildInputs = [ openvpn mono stunnel ];

Comment on lines 38 to 41
nativeBuildInputs = [pkg-config which cmake dotnet-sdk gtk2 lzma.dev libappindicator-gtk2.dev
libselinux libsepol fribidi libthai libdatrie xorg.libXdmcp
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nativeBuildInputs = [pkg-config which cmake dotnet-sdk gtk2 lzma.dev libappindicator-gtk2.dev
libselinux libsepol fribidi libthai libdatrie xorg.libXdmcp
];
nativeBuildInputs = [
pkg-config which cmake dotnet-sdk gtk2 lzma.dev libappindicator-gtk2.dev
libselinux libsepol fribidi libthai libdatrie xorg.libXdmcp
];

rev = "2.18.9";
sha256 = "1nvnvy6lskydfrlsrbyk065hl6zxdyivhrynydny1kirz3qmrw61";
};
sourceRoot= "/build/source/src/UI.GTK.Linux.Tray";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sourceRoot= "/build/source/src/UI.GTK.Linux.Tray";
sourceRoot= "src/UI.GTK.Linux.Tray";

This should be relative and not absolute.


postPatch = ''
# Fix libappindicator include directory
substituteInPlace /build/source/src/UI.GTK.Linux.Tray/CMakeLists.txt --replace '/usr/include/libappindicator-0.1' '${libappindicator-gtk2.dev}/include/libappindicator-0.1';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
substituteInPlace /build/source/src/UI.GTK.Linux.Tray/CMakeLists.txt --replace '/usr/include/libappindicator-0.1' '${libappindicator-gtk2.dev}/include/libappindicator-0.1';
substituteInPlace /build/source/src/UI.GTK.Linux.Tray/CMakeLists.txt \
--replace '/usr/include/libappindicator-0.1' '${libappindicator-gtk2.dev}/include/libappindicator-0.1';

Comment on lines 37 to 55
chmod -R +w /build/source
cd /build/source/src/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or alternatively use relative paths.

Comment on lines +65 to +78
cp repository/linux_arch/bundle/eddie-ui/usr/bin/eddie-ui $out/bin/eddie-ui
substituteInPlace $out/bin/eddie-ui --replace '/usr/' $out/
chmod +x $out/bin/eddie-ui
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure but it could be that the binary gets double wrapped.

Comment on lines 96 to 97
longDescription = ''
Eddie - OpenVPN GUI for AirVPN. AirVPN is based on OpenVPN and operated by activists and hacktivists in defence of net neutrality, privacy and against censorship.
'';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
longDescription = ''
Eddie - OpenVPN GUI for AirVPN. AirVPN is based on OpenVPN and operated by activists and hacktivists in defence of net neutrality, privacy and against censorship.
'';
longDescription = ''
Eddie is a OpenVPN GUI for AirVPN. AirVPN is based on OpenVPN and operated by activists and hacktivists in defence of net neutrality, privacy and against censorship.
'';

@vanbeast vanbeast force-pushed the eddieui-pkg branch 2 times, most recently from 8ff6884 to 9a609eb Compare March 23, 2021 06:36
@vanbeast
Copy link
Author

@SuperSandro2000
substituteInPlace src/App.CLI.Linux.Elevated/build.sh --replace '-static -pthread' '-pthread'
Regarding the line above. I'm removing -static option because otherwise I have these errors:
...binutils-2.35.1/bin/ld: cannot find -lpthread
...binutils-2.35.1/bin/ld: cannot find -lm
...binutils-2.35.1/bin/ld: cannot find -lpthread
...binutils-2.35.1/bin/ld: cannot find -lc

Do you have an idea how it can be fixed?
Also, we want packages mono, openvpn and stunnel installed together with eddie-ui. Can we add something to default.nix to ensure this?

@vanbeast vanbeast force-pushed the eddieui-pkg branch 2 times, most recently from 9c622d3 to 1da2d55 Compare March 23, 2021 07:02
@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Apr 6, 2021

@SuperSandro2000
substituteInPlace src/App.CLI.Linux.Elevated/build.sh --replace '-static -pthread' '-pthread'
Regarding the line above. I'm removing -static option because otherwise I have these errors:
...binutils-2.35.1/bin/ld: cannot find -lpthread
...binutils-2.35.1/bin/ld: cannot find -lm
...binutils-2.35.1/bin/ld: cannot find -lpthread
...binutils-2.35.1/bin/ld: cannot find -lc

Do you have an idea how it can be fixed?
Also, we want packages mono, openvpn and stunnel installed together with eddie-ui. Can we add something to default.nix to ensure this?

I don't know. Probably static compilation is not supported like this.

You can use makeWrapper to put those programs into the PATH if you mean this. Otherwise you need to create a module which puts those packages into systemPackages.

@vanbeast vanbeast marked this pull request as draft April 12, 2021 02:25
@vanbeast
Copy link
Author

Thanks Sandro. I made this PR a draft. I will need to spend some time to figure out those issues

@stale
Copy link

stale bot commented Oct 12, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 12, 2021
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 12, 2023
@chrisdebian
Copy link

Hi, guys.

Is the work in AirVPN/ eddie-ui dead? I'm considering distrohopping and making NixOS my main OS. I do need AirVPN/ eddie, though. I guess it's probably available as a Flatpak, if not from NixOS.

Thanks,

Chris

@DavidOliver
Copy link

I'd also like to use Eddie. In the meantime, I've found that sudo openvpn <openvpn config file downloaded from airvpn's config generator tool> works well. I believe firewall rules can block traffic other than that of the tun.

@vanbeast
Copy link
Author

vanbeast commented Jul 3, 2023

I've stopped using NixOS, so I'm not going to work on this package anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants