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

legcord: add autoPatchElfHook for venmic module #388827

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wrmilling
Copy link
Member

Attempting to address issue as expressed in: #383696 (comment)

Things done

Added autoPatchElfHook so that the venmic node.js module can be patched at build time.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@wrmilling
Copy link
Member Author

@nyabinary Can you take a look as see if this fixes the issue you are having? I will convert it to a full PR if it does resolve the problem.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1 10.rebuild-linux: 1-10 labels Mar 10, 2025
@nyabinary
Copy link
Contributor

nyabinary commented Mar 10, 2025

@nyabinary Can you take a look as see if this fixes the issue you are having? I will convert it to a full PR if it does resolve the problem.

Nope, didn't work, outputs this when I screenshare (in terminal).

WebRTC Capturer detected, using native window picker.
'loop->recurse > 0' failed at ../src/pipewire/thread-loop.c:425 pw_thread_loop_wait()
trying to import /nix/store/f8x40cl8ghmzb4i6ddgs4n81bifq2dk2-legcord-1.1.0/share/lib/legcord/resources/app.asar/dist/venmic-x64.node
Failed to import Venmic module Error: Cannot find module '/nix/store/f8x40cl8ghmzb4i6ddgs4n81bifq2dk2-legcord-1.1.0/share/lib/legcord/resources/app.asar/dist/venmic-x64.node'
Require stack:
- /nix/store/f8x40cl8ghmzb4i6ddgs4n81bifq2dk2-legcord-1.1.0/share/lib/legcord/resources/app.asar/ts-out/main-Dy_lruhE.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1232:15)
    at s._resolveFilename (node:electron/js2c/browser_init:2:124485)
    at Module._load (node:internal/modules/cjs/loader:1058:27)
    at c._load (node:electron/js2c/node_init:2:16955)
    at Module.require (node:internal/modules/cjs/loader:1318:19)
    at require (node:internal/modules/helpers:179:18)
    at Qt (file:///nix/store/f8x40cl8ghmzb4i6ddgs4n81bifq2dk2-legcord-1.1.0/share/lib/legcord/resources/app.asar/ts-out/main-Dy_lruhE.js:48:645)
    at G (file:///nix/store/f8x40cl8ghmzb4i6ddgs4n81bifq2dk2-legcord-1.1.0/share/lib/legcord/resources/app.asar/ts-out/main-Dy_lruhE.js:48:891)
    at file:///nix/store/f8x40cl8ghmzb4i6ddgs4n81bifq2dk2-legcord-1.1.0/share/lib/legcord/resources/app.asar/ts-out/main-Dy_lruhE.js:48:1376
    at WebContents.<anonymous> (node:electron/js2c/browser_init:2:87415) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/nix/store/f8x40cl8ghmzb4i6ddgs4n81bifq2dk2-legcord-1.1.0/share/lib/legcord/resources/app.asar/ts-out/main-Dy_lruhE.js'
  ]
}
Obtained Venmic module

@wrmilling
Copy link
Member Author

Nope, didn't work, outputs this when I screenshare (in terminal).

Thank, will try to reproduce locally, may be a bit before I can dig into it though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants