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

houdini: make houdini run again #370461

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Conversation

wrvsrx
Copy link
Contributor

@wrvsrx wrvsrx commented Jan 3, 2025

After #363168, houdini can't run anymore becase of infinite loop in shell script. extraInstallCommands of #363168 gives such script $out/bin/houdini:

\#!${stdenv.shell}
exec $out/bin/houdini ${unwrapped}/bin/houdini "$@"

This script exec itself infinitely.

Things done

  • 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.

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

lucasew commented Jan 3, 2025

Can you add a versionCheckHook?

@wrvsrx
Copy link
Contributor Author

wrvsrx commented Jan 4, 2025

I'm not sure how to add versionCheckHook to buildFHSEnv, can you give a rough example?

@lucasew
Copy link
Contributor

lucasew commented Jan 4, 2025

I'm not sure how to add versionCheckHook to buildFHSEnv, can you give a rough example?

I never tried tbh. If buildFHSEnv passthru the arguments to mkDerivation somehow it would be basically the same as it's done everywhere else.

@wrvsrx
Copy link
Contributor Author

wrvsrx commented Jan 4, 2025

@lucasew buildFHSEnv use runCommandLocal to create the final (executable) derivation, I don't know how to add versionCheckHook into that.

@lucasew
Copy link
Contributor

lucasew commented Jan 4, 2025

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 370461

@lucasew
Copy link
Contributor

lucasew commented Jan 4, 2025

@lucasew buildFHSEnv use runCommandLocal to create the final (executable) derivation, I don't know how to add versionCheckHook into that.

Try to pass it as buildFHSEnv is mkDerivation. If it doesn't show the check version message then let it the way it is and let me know.

@wrvsrx
Copy link
Contributor Author

wrvsrx commented Jan 4, 2025

Add versionCheckHook to nativeBuildInputs and set doInstallCheck = true make Using versionCheckHook appears in nix log .#houdini.

However, nix eval .#houdini.doInstallCheck gives false, which means also hook is added, doInstallCheck is not passed to the final derivation.

@wrvsrx wrvsrx mentioned this pull request Jan 4, 2025
13 tasks
After NixOS#363168, houdini can't run anymore becase of infinite loop in
shell script. `extraInstallCommands` of NixOS#363168 gives such script
`$out/bin/houdini`:

```bash
\#!${stdenv.shell}
exec $out/bin/houdini ${unwrapped}/bin/houdini "$@"
```

This script exec itself infinitely.
@wrvsrx wrvsrx requested a review from pedohorse January 4, 2025 14:58
@pedohorse pedohorse mentioned this pull request Jan 4, 2025
13 tasks
@pedohorse
Copy link
Contributor

I personally like this change now.
But there are more knowing people who may comment of what would be the most "this-is-the-way" way

@wrvsrx
Copy link
Contributor Author

wrvsrx commented Jan 4, 2025

I'll want for your decision.

Copy link
Contributor

@Pandapip1 Pandapip1 left a comment

Choose a reason for hiding this comment

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

LGTM. If you really want a version test, you could use passthru.tests / testers.testVersion

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jan 4, 2025
@wrvsrx
Copy link
Contributor Author

wrvsrx commented Jan 5, 2025

LGTM. If you really want a version test, you could use passthru.tests / testers.testVersion

Maybe I can investigate how to do that and add it in another PR. Maybe currently fixing the package is more urgent than adding the test?

@lucasew
Copy link
Contributor

lucasew commented Jan 5, 2025

LGTM. If you really want a version test, you could use passthru.tests / testers.testVersion

Maybe I can investigate how to do that and add it in another PR. Maybe currently fixing the package is more urgent than adding the test?

I agree

@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two reputable people and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Jan 5, 2025
@Stunkymonkey Stunkymonkey merged commit f3de104 into NixOS:master Jan 6, 2025
24 checks passed
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: 0 This PR does not cause any packages to rebuild on Linux 12.approvals: 2 This PR was reviewed and approved by two reputable people
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants