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

Retain meta from wrapper script during buildEnv #90

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

lxp
Copy link
Contributor

@lxp lxp commented Aug 19, 2024

Currently, no metadata is set for the environment, which leads to the wrong assumption that the main program used when running the environment equals the package name. In our case this is the original package name prefixed with "nixpak-".
However, the wrapper script is named like the original main program, which leads to errors like the following when running the environment:

error: unable to execute '/nix/store/apnm35wckzlq4nqcmk3zpwys07srn9y4-nixpak-ungoogled-chromium-127.0.6533.99/bin/nixpak-ungoogled-chromium': No such file or directory

This commit retains the metadata from the wrapper script when building the environment, which also copies meta.mainProgram. Therefore, the correct main program is detected when running the environment.

This might also partly fix nixpak/pkgs#24.

Currently, no metadata is set for the environment, which leads to
the wrong assumption that the main program used when running the
environment equals the package name. In our case this is the
original package name prefixed with "nixpak-".
However, the wrapper script is named like the original main
program, which leads to errors like the following when running
the environment:
  error: unable to execute '/nix/store/apnm35wckzlq4nqcmk3zpwys07srn9y4-nixpak-ungoogled-chromium-127.0.6533.99/bin/nixpak-ungoogled-chromium': No such file or directory

This commit retains the metadata from the wrapper script when
building the environment, which also copies meta.mainProgram.
Therefore, the correct main program is detected when running the
environment.
@max-privatevoid max-privatevoid merged commit 7b92440 into nixpak:master Aug 20, 2024
@lxp lxp deleted the retain-meta-main-program-in-env branch August 20, 2024 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trouble running chromium
2 participants