Skip to content

emissary: include necessary dynamic library guis, and 0.3.1 -> 0.4.0 - #510027

Open
cappuccinocosmico wants to merge 6 commits into
NixOS:masterfrom
cappuccinocosmico:emissary-include-necessary-dynamic-library-guis
Open

cappuccinocosmico wants to merge 6 commits into
NixOS:masterfrom
cappuccinocosmico:emissary-include-necessary-dynamic-library-guis

Conversation

@cappuccinocosmico

@cappuccinocosmico cappuccinocosmico commented Apr 14, 2026 •

Copy link
Copy Markdown

This goes ahead and bumps the version from 0.3.1 -> 0.4.0, and adds in some dynamic libraries that were preventing the UI from running on a regular nixos install.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@nixpkgs-ci
nixpkgs-ci Bot requested a review from N4CH723HR3R April 14, 2026 17:27
@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle! labels Apr 14, 2026
@cappuccinocosmico
cappuccinocosmico force-pushed the emissary-include-necessary-dynamic-library-guis branch from fb51dec to 8eac668 Compare April 14, 2026 17:34
@N4CH723HR3R

Copy link
Copy Markdown
Contributor

thanks a ton, i was ill so sorry for the delay ❤️

i'll check it out with nixpkgs-review in a sec

@N4CH723HR3R

Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 510027
Commit: 8eac668230fec717fa741e739586b71282d14c67


x86_64-linux

✅ 1 package built:
  • emissary

@N4CH723HR3R N4CH723HR3R left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved automatically following the successful run of nixpkgs-review.

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. labels Apr 17, 2026
@N4CH723HR3R

N4CH723HR3R commented Apr 17, 2026 •

Copy link
Copy Markdown
Contributor

it works but its currently native-ui only. i definitely want web-ui, native-ui and no UI working so that i can write a module
(EDIT: thats for a future PR though)

@N4CH723HR3R

Copy link
Copy Markdown
Contributor

@NixOS/nixpkgs-merge-bot merge

@nixpkgs-ci

nixpkgs-ci Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

@N4CH723HR3R wants to merge this PR.

Requirements to merge this PR with @NixOS/nixpkgs-merge-bot merge:

  • ✅ PR targets a development branch.
  • ✅ PR touches only files of packages in pkgs/by-name/.
  • ❌ PR is at least one of:
  • ✅ PR is not a draft
  • ✅ N4CH723HR3R is a member of @NixOS/nixpkgs-maintainers.
  • ✅ N4CH723HR3R is a maintainer of all touched packages.

❌ Pull Request could not be merged (#305350)

Comment thread pkgs/by-name/em/emissary/package.nix Resolved
Comment thread pkgs/by-name/em/emissary/package.nix Resolved
@cappuccinocosmico

Copy link
Copy Markdown
Author

Just got the notifications for this. I did futz around a bit trying to get patchelf to work, should be able to test those out tomorrow morning.

@cappuccinocosmico
cappuccinocosmico force-pushed the emissary-include-necessary-dynamic-library-guis branch from c027595 to 4aca675 Compare April 21, 2026 16:16
@nixpkgs-ci nixpkgs-ci Bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Apr 21, 2026
@cappuccinocosmico

Copy link
Copy Markdown
Author

Also while I was at it @N4CH723HR3R I went ahead and dug around with the webUI and found you need to explicitly enable a cargo feature, during the build step to get the web-ui to have any functionality at all, ie by adding something like:

cargoHash = "sha256-cP1ddtppcSUhl2G2C/Pd4+C/xqlB27/D12t5lFUfChQ=";
cargoBuildFlags = [ "--features" "web-ui" ];
# ^^^^^Add this Line ^^^^^^^
nativeBuildInputs = [
  pkg-config
]

However, its impossible to build the package with both the "web-ui" and the "native" features enabled at the same time:

   Compiling clap v4.5.40
   Compiling yosemite v0.7.0
   Compiling emissary-util v0.4.0 (/build/source/emissary-util)
   Compiling emissary-cli v0.4.0 (/build/source/emissary-cli)
error[E0428]: the name `main` is defined multiple times
   --> emissary-cli/src/main.rs:472:1
    |
403 | fn main() -> anyhow::Result<()> {
    | ------------------------------- previous definition of the value `main` here
...
472 | fn main() -> anyhow::Result<()> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` redefined here
    |
    = note: `main` must be defined only once in the value namespace of this module

error: native and web ui cannot be enabled at the same time
  --> emissary-cli/src/main.rs:59:1
   |
59 | compile_error!("native and web ui cannot be enabled at the same time");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There are a couple ways we could solve this on our end, maybe by building the 2 versions in a single derivation and shipping them both, or by including 2 deriviations. Although the cleanest solution might just be to submit a PR to emissary to allow switching between both at runtime, since I am sure its going to be annoying for packaging with other distros.

Comment thread pkgs/by-name/em/emissary/package.nix Outdated

nativeBuildInputs = [
pkg-config
]
++ lib.optionals stdenv.targetPlatform.isLinux [
makeWrapper

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't be necessary now?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah great catch! Also checked that the UI was still working with the x11 and wayland build inputs removed, so I cleaned those up as well. I will try to catch these things better in future PRs :)

@K900

K900 commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

cargoBuildFlags = [ "--features" "web-ui" ];

I'm pretty sure we have cargoFeatures or something of the sort.

@cappuccinocosmico

cappuccinocosmico commented Apr 23, 2026 •

Copy link
Copy Markdown
Author

cargoBuildFlags = [ "--features" "web-ui" ];

I'm pretty sure we have cargoFeatures or something of the sort.

Yeah we totally do. According to this: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md, the best way to get this set up would be to add:

{
  cargoHash = "sha256-cP1ddtppcSUhl2G2C/Pd4+C/xqlB27/D12t5lFUfChQ=";
  # New Block:
  buildFeatures = [
    "web-ui"
    "native-ui"
  ];
}

After the 0.4.1 release, which should include a fix to allow both features to be compiled at the same time:
eepnet/emissary#344
eepnet/emissary#348

@N4CH723HR3R

Copy link
Copy Markdown
Contributor

Also while I was at it @N4CH723HR3R I went ahead and dug around with the webUI and found you need to explicitly enable a cargo feature, during the build step to get the web-ui to have any functionality at all, ie by adding something like:

cargoHash = "sha256-cP1ddtppcSUhl2G2C/Pd4+C/xqlB27/D12t5lFUfChQ=";
cargoBuildFlags = [ "--features" "web-ui" ];
# ^^^^^Add this Line ^^^^^^^
nativeBuildInputs = [
  pkg-config
]

However, its impossible to build the package with both the "web-ui" and the "native" features enabled at the same time:

   Compiling clap v4.5.40
   Compiling yosemite v0.7.0
   Compiling emissary-util v0.4.0 (/build/source/emissary-util)
   Compiling emissary-cli v0.4.0 (/build/source/emissary-cli)
error[E0428]: the name `main` is defined multiple times
   --> emissary-cli/src/main.rs:472:1
    |
403 | fn main() -> anyhow::Result<()> {
    | ------------------------------- previous definition of the value `main` here
...
472 | fn main() -> anyhow::Result<()> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` redefined here
    |
    = note: `main` must be defined only once in the value namespace of this module

error: native and web ui cannot be enabled at the same time
  --> emissary-cli/src/main.rs:59:1
   |
59 | compile_error!("native and web ui cannot be enabled at the same time");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There are a couple ways we could solve this on our end, maybe by building the 2 versions in a single derivation and shipping them both, or by including 2 deriviations. Although the cleanest solution might just be to submit a PR to emissary to allow switching between both at runtime, since I am sure its going to be annoying for packaging with other distros.

you can also do

buildFeatures = [ "a" "b" "c" ];

@N4CH723HR3R N4CH723HR3R left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lets fix #514132 while we're at it

Comment thread pkgs/by-name/em/emissary/package.nix Resolved
@N4CH723HR3R

Copy link
Copy Markdown
Contributor

hi, are you still working on this? @cappuccinocosmico

@cappuccinocosmico

Copy link
Copy Markdown
Author

Oh yeah sorry, I was able to get a PR merged into emissary that lets us have a single binary with both webui and the native UI installed. However, that fix probably won't be availible until the next 0.4.1 or 0.5.0 release, So I was planning on waiting for that to drop then add the nixos modules after that. Although one alternative would just be to disable the Native UI, add the options now, and enable it after the patch drops

@N4CH723HR3R

N4CH723HR3R commented May 10, 2026 •

Copy link
Copy Markdown
Contributor

Oh yeah sorry, I was able to get a PR merged into emissary that lets us have a single binary with both webui and the native UI installed. However, that fix probably won't be availible until the next 0.4.1 or 0.5.0 release, So I was planning on waiting for that to drop then add the nixos modules after that. Although one alternative would just be to disable the Native UI, add the options now, and enable it after the patch drops

i'd merge this without waiting (after you rebase & squash) since it fixes a bug critical to the function of the application. if you need help with squashing (explanation, etc.) feel free to ask :)

@MysteryBlokHed

Copy link
Copy Markdown
Contributor

@cappuccinocosmico Are you still interested in working on this PR?

@nixpkgs-ci nixpkgs-ci Bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in any of the changed packages. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants