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

blueberry: init at 1.3.9 #94819

Merged
merged 1 commit into from Aug 21, 2020
Merged

blueberry: init at 1.3.9 #94819

merged 1 commit into from Aug 21, 2020

Conversation

romildo
Copy link
Contributor

@romildo romildo commented Aug 6, 2020

Motivation for this change

Add blueberry, a Bluetooth configuration tool.

It is Linux Mint's spin-off of GNOME Bluetooth, which works in all desktop environments.

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

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/256

@symphorien
Copy link
Member

(blueberry.py:16628): com.linuxmint.blueberry-WARNING **: 16:05:45.885: Could not retrieve the BT adapter name with 'bt-adapter -i': Command '['timeout', '2s', 'bt-adapter', '-i']' returned non-zero exit status 127.

it looks like it depends on bt-adapter, which is not installed on my system

Copy link
Member

@Thra11 Thra11 left a comment

Choose a reason for hiding this comment

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

I tested this by running nix-shell -p blueberry and then running blueberry. It built ok, and the GUI loaded, but it kept outputting erros like this whenever I tried to do anything:

(blueberry.py:7813): com.linuxmint.blueberry-WARNING **: 14:33:19.022: Could not retrieve the BT adapter name with 'bt-adapter -i': Command '['timeout', '2s', 'bt-adapter', '-i']' returned non-zero exit status 127.
timeout: failed to run command ‘bt-adapter’: No such file or directory

bt-adapter is in the bluez-tools package. I don't think putting bluez-tools in buildInputs is sufficient to make its binaries accessible to blueberry at runtime. It looks like the bt-adapter binary is quite central to this application (as opposed to an optional dependency where it might make sense to leave it up to the user to provide it), so it probably should be there. I'm not 100% sure what the correct solution is (manual substitution of absolute path? propagatedBuildInputs?)

pkgs/tools/bluetooth/blueberry/default.nix Outdated Show resolved Hide resolved
@symphorien
Copy link
Member

propagatedBuildInputs won't do the trick. Either patching the paths, or add it in PATH in the wrapper.

@Thra11
Copy link
Member

Thra11 commented Aug 14, 2020

It works for me now. Not sure of the nuances, but would substituteInPlace be preferable to sed?

@symphorien
Copy link
Member

It does not require escaping, and prints a warning if no replacement is done, iirc.

@romildo
Copy link
Contributor Author

romildo commented Aug 14, 2020

I have replaced sed by substituteInPlace, but I had to stop using find and be explicitly about which files should be edited.

@romildo romildo requested a review from Thra11 August 20, 2020 19:58
Copy link
Member

@Thra11 Thra11 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 to me.

@romildo romildo merged commit e10dc49 into NixOS:master Aug 21, 2020
@romildo romildo deleted the upd.blueberry branch August 21, 2020 21:52
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

4 participants