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

gomuks: patch out hardcoded path #109608

Merged
merged 2 commits into from Jan 20, 2021

Conversation

chvp
Copy link
Member

@chvp chvp commented Jan 17, 2021

Motivation for this change

I didn't get any notification sounds, and I didn't like that.

Things done

Verified that I now do get notification sounds.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • 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"
  • 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.

@chvp
Copy link
Member Author

chvp commented Jan 17, 2021

One thing I wasn't sure about was whether to add a wrapProgram that adds pulseaudio and libnotify to the PATH (but only on Linux?). I currently do that in my nixos config, but it also makes sense to do this in the package, I think.

@emilazy
Copy link
Member

emilazy commented Jan 17, 2021

Seems reasonable. Could you open an upstream issue about not hardcoding the sound theme directory (and potentially paplay, which we should otherwise patch to a full path) and link it in a comment?

@chvp
Copy link
Member Author

chvp commented Jan 17, 2021

Seems reasonable. Could you open an upstream issue about not hardcoding the sound theme directory (and potentially paplay, which we should otherwise patch to a full path) and link it in a comment?

Done (tulir/gomuks#260)

Copy link
Member

@emilazy emilazy left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you!

@tilpner
Copy link
Member

tilpner commented Jan 17, 2021

@charvp I didn't know it was supposed to make sounds, but then... I haven't used it in quite a while. If you're up for it, replace me in the maintainer list?

@chvp
Copy link
Member Author

chvp commented Jan 17, 2021

@charvp I didn't know it was supposed to make sounds, but then... I haven't used it in quite a while. If you're up for it, replace me in the maintainer list?

Done.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 109608 run on x86_64-linux 1

1 package built:
  • gomuks

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 109608 run on x86_64-darwin 1

1 package marked as broken and skipped:
  • gomuks

@chvp
Copy link
Member Author

chvp commented Jan 17, 2021

I've changed it so the patch is only included when the platform is Linux, which should hopefully unbreak darwin (since it seems that the extra pulseaudio dependency broke it).

@SuperSandro2000
Copy link
Member

I've changed it so the patch is only included when the platform is Linux, which should hopefully unbreak darwin (since it seems that the extra pulseaudio dependency broke it).

Good intention but normally we do not apply patches conditionally to prevent bit rot. I am not sure if it is okay here.

@chvp
Copy link
Member Author

chvp commented Jan 17, 2021

Good intention but normally we do not apply patches conditionally to prevent bit rot. I am not sure if it is okay here.

The patched file is only compiled in on Linux, so it doesn't seem like a problem to me. But I'm not as experienced, so maybe it's a problem here as well.

@SuperSandro2000
Copy link
Member

The patched file is only compiled in on Linux, so it doesn't seem like a problem to me. But I'm not as experienced, so maybe it's a problem here as well.

I thought a bit about it. Darwin does not work right now anyway so I would prefer to just apply the patch to all platforms and then I'll give this a merge.

@chvp
Copy link
Member Author

chvp commented Jan 18, 2021

The Darwin build does succeed right now (with the derivation on the main branch): https://hydra.nixos.org/build/135068035
Or do you mean that running the program doesn't actually work?

@SuperSandro2000
Copy link
Member

Or do you mean that running the program doesn't actually work?

I meant building. Can you adopt the patch so that it applies on all platforms and does not break darwin?

@chvp
Copy link
Member Author

chvp commented Jan 20, 2021

I've changed it so the binaries are injected with wrapProgram (but only when stdenv is Linux) and the hardcoded path is fixed with the patch. Since the darwin breakage was due to the pulseaudio injection this should work on all platforms. I wasn't able to test the Darwin build, since I don't have a Darwin machine.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 109608 run on x86_64-darwin 1

1 package built:
  • gomuks

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 109608 run on x86_64-linux 1

1 package built:
  • gomuks

@SuperSandro2000 SuperSandro2000 merged commit 6e38706 into NixOS:master Jan 20, 2021
@chvp chvp deleted the pr/gomuks-hardcoded-path branch January 20, 2021 15:48
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