Skip to content

Conversation

@Cameo007
Copy link
Contributor

@Cameo007 Cameo007 commented Sep 18, 2025

Add librepods: AirPods libreated from Apple's ecosystem.

https://github.com/kavishdevar/librepods

There is just one problem when running it.

qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.

Running librepods as root is a workaround for this but

  1. I don't think you should need to run such an app as root
  2. it doesn't work with pactl

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@Cameo007
Copy link
Contributor Author

#440322

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Sep 18, 2025
@lesbiannix
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 444137
Commit: 94a8d637f8b4d4b3a975b085ee980603f4f7b1e9


x86_64-linux

✅ 1 package built:
  • librepods

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Sep 19, 2025
@liberodark
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 444137
Commit: 94a8d637f8b4d4b3a975b085ee980603f4f7b1e9 (subsequent changes)
Merge: 6557b8ed4054aca293f018bd9162bb688281ff2b

Logs: https://github.com/liberodark/nixpkgs-review-gha/actions/runs/17857538639


x86_64-linux

✅ 1 package built:
  • librepods

aarch64-linux

✅ 1 package built:
  • librepods

x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

@Cameo007 Cameo007 changed the title librepods: init at nightly librepods: init at f547cc13c0cb1a021f6ea7b88056b1a54d440ebf Sep 19, 2025
Copy link
Contributor

@acid-bong acid-bong left a comment

Choose a reason for hiding this comment

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

now i'm back at my pc and can test what i'm suggesting. all these are tested locally and work on my machine™️

@Cameo007 Cameo007 changed the title librepods: init at f547cc13c0cb1a021f6ea7b88056b1a54d440ebf librepods: init at 0.1.0-rc.4 Sep 19, 2025
Copy link
Contributor

@acid-bong acid-bong left a comment

Choose a reason for hiding this comment

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

Just one little nitpick, and i'm done 😅

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Sep 19, 2025
@Cameo007
Copy link
Contributor Author

No problem, I really appreciate your patience.

There is just one thing from my side.
One one hand the program needs to be run as root for some bluetooth stuff to work but on the other hand pactl does not work as root. Also I don't think that the user should necessarily need to run this as root.

The nightly version showed some logs about CAP_NET_ADMIN being necessary here.
However enabling it on a copy of the binary (the one in ./result is read-only) with sudo setcap cap_net_admin+ep librepods does not help.

Is there a way we can set this in the package or is this something the user has to do?

@qzylinra
Copy link
Contributor

You can write a nixos module to set security.wrappers

@nixpkgs-ci nixpkgs-ci bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` and removed 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Sep 30, 2025
@Cameo007
Copy link
Contributor Author

Cameo007 commented Sep 30, 2025

I now wrote a module and patched the autostart .desktop file because with the original path it failed to load QtQuick.Controls.
However I noticed that the path in the autostart file is not the path used when running librepods directly (which is /run/wrappers/wrappers.LUhfWBFYDz/librepods). This doesn't cause any problems beside the title bar not being fully white.

But it might be better to fix this upstream and to obtain the right path.

https://github.com/kavishdevar/librepods/blob/main/linux/autostartmanager.hpp#L58

@Cameo007 Cameo007 changed the title librepods: init at 0.1.0-rc.4 librepods: init at 0.2.0-alpha Oct 1, 2025
@h7x4 h7x4 added the 8.has: module (new) This PR adds a module in `nixos/` label Oct 1, 2025
@liberodark
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 444137
Commit: d56a42d631d2211bae6ff3e854e15c79532d8442 (subsequent changes)
Merge: e97c7a365cae140eacfd1d852030546c8e8ec6ea

Logs: https://github.com/liberodark/nixpkgs-review-gha/actions/runs/18235710097


x86_64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
✅ 1 package built:
  • librepods

aarch64-linux

⏩ 2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
✅ 1 package built:
  • librepods

x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

@fugidev
Copy link
Member

fugidev commented Nov 16, 2025

Works well for me (with the wrapper), except for theming:

(librepods:18744): Gtk-WARNING **: 14:09:26.881: Unable to locate theme engine in module_path: "adwaita",
Fontconfig warning: using without calling FcInit()
[...]
qt.qpa.theme.gnome: dbus reply error: [ "org.freedesktop.DBus.Error.AccessDenied" ] "Portal operation not allowed: Unable to open /proc/18521/root"

@ZainKergaye
Copy link
Contributor

Is there anything I can do to speed this up and get this merged? I would love to just try it out without messing around with a bunch of nix build files

@Cameo007
Copy link
Contributor Author

Is there anything I can do to speed this up and get this merged? I would love to just try it out without messing around with a bunch of nix build files

If you know how to solve this problem with the autostart path. I mean it doesn't cause any severe issues but I want it to be as it is intended by it's creators.

@NetaliDev
Copy link
Member

What is the intended use of the autostart path? It seems to work fine as it is right now.

And could you please address the requested changes to the module and the package? These requested changes are also preventing the PR from being merged.

@Cameo007 Cameo007 force-pushed the add-librepods branch 2 times, most recently from 58b2b2a to e909d34 Compare December 3, 2025 22:28
@Cameo007 Cameo007 requested a review from qzylinra December 4, 2025 19:01
@Redlonghead Redlonghead mentioned this pull request Dec 7, 2025
13 tasks
@phanirithvij
Copy link
Member

There is a new iced implementation kavishdevar/librepods#241, and the old qt one seems to have halted development. Quoting https://github.com/kavishdevar/librepods#linux

for the old version see the Linux README. (doesn't have many features, maintainer didn't have time to work on it)
new version in development (kavishdevar/librepods#241)

Non-blocking: I think its fine to package the current one still, but better not backport it to stable.

@Cameo007
Copy link
Contributor Author

Cameo007 commented Dec 9, 2025

Thanks for the hint

@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Dec 9, 2025
@Redlonghead
Copy link
Contributor

Thanks for the hint

I do have the iced version packaged in my nixos-config, I was just waiting for it to be on the main branch before finalizing it. You can totally copy from it if you package it here at some point. :)

@Cameo007
Copy link
Contributor Author

Cameo007 commented Dec 9, 2025

Thanks for the hint

I do have the iced version packaged in my nixos-config, I was just waiting for it to be on the main branch before finalizing it. You can totally copy from it if you package it here at some point. :)

That’s good to know, especially for the Iced stuff.
I will definitely take a look at your config as soon as it’s released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.