-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
ayatana-indicator-sound: init & add to Lomiri #305127
Merged
SuperSandro2000
merged 2 commits into
NixOS:master
from
OPNA2608:init/lomiri/ayatana-indicator-sound
May 23, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
{ stdenv | ||
, lib | ||
, gitUpdater | ||
, fetchFromGitHub | ||
, nixosTests | ||
, accountsservice | ||
, cmake | ||
, dbus | ||
, dbus-test-runner | ||
, glib | ||
, gobject-introspection | ||
, gtest | ||
, intltool | ||
, libayatana-common | ||
, libgee | ||
, libnotify | ||
, libpulseaudio | ||
, libqtdbusmock | ||
, libqtdbustest | ||
, libsForQt5 | ||
, libxml2 | ||
, lomiri | ||
, pkg-config | ||
, python3 | ||
, systemd | ||
, vala | ||
, wrapGAppsHook3 | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "ayatana-indicator-sound"; | ||
version = "24.4.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "AyatanaIndicators"; | ||
repo = "ayatana-indicator-sound"; | ||
rev = "refs/tags/${finalAttrs.version}"; | ||
hash = "sha256-2B2CFUjDvBpZ8R4fnGDViS3pXO1L0kP1tnJCtqKeLaQ="; | ||
}; | ||
|
||
postPatch = '' | ||
# Replace systemd prefix in pkg-config query, use GNUInstallDirs location for /etc | ||
substituteInPlace data/CMakeLists.txt \ | ||
--replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})' \ | ||
--replace-fail 'DESTINATION "/etc' 'DESTINATION "''${CMAKE_INSTALL_FULL_SYSCONFDIR}' | ||
|
||
# Build-time Vala codegen | ||
substituteInPlace src/CMakeLists.txt \ | ||
--replace-fail '/usr/share/gir-1.0/AccountsService-1.0.gir' '${lib.getDev accountsservice}/share/gir-1.0/AccountsService-1.0.gir' | ||
''; | ||
|
||
strictDeps = true; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
gobject-introspection | ||
intltool | ||
libpulseaudio # vala files(?) | ||
pkg-config | ||
vala | ||
wrapGAppsHook3 | ||
]; | ||
|
||
buildInputs = [ | ||
accountsservice | ||
glib | ||
gobject-introspection | ||
libayatana-common | ||
libgee | ||
libnotify | ||
libpulseaudio | ||
libxml2 | ||
systemd | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we could slim this down to libsystemd? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A |
||
] ++ (with lomiri; [ | ||
cmake-extras | ||
lomiri-api | ||
lomiri-schemas | ||
]); | ||
|
||
nativeCheckInputs = [ | ||
dbus | ||
(python3.withPackages (ps: with ps; [ | ||
python-dbusmock | ||
])) | ||
]; | ||
|
||
checkInputs = [ | ||
dbus-test-runner | ||
gtest | ||
libsForQt5.qtbase | ||
libqtdbusmock | ||
libqtdbustest | ||
lomiri.gmenuharness | ||
]; | ||
|
||
cmakeFlags = [ | ||
(lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck) | ||
(lib.cmakeBool "ENABLE_LOMIRI_FEATURES" true) | ||
(lib.cmakeBool "GSETTINGS_LOCALINSTALL" true) | ||
(lib.cmakeBool "GSETTINGS_COMPILE" true) | ||
]; | ||
|
||
dontWrapQtApps = true; | ||
|
||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; | ||
|
||
passthru = { | ||
ayatana-indicators = [ "ayatana-indicator-sound" ]; | ||
tests.vm = nixosTests.ayatana-indicators; | ||
updateScript = gitUpdater { }; | ||
}; | ||
|
||
meta = with lib; { | ||
description = "Ayatana Indicator for managing system sound"; | ||
longDescription = '' | ||
Ayatana Indicator Sound that provides easy control of the PulseAudio | ||
sound daemon. | ||
''; | ||
homepage = "https://github.com/AyatanaIndicators/ayatana-indicator-sound"; | ||
changelog = "https://github.com/AyatanaIndicators/ayatana-indicator-sound/blob/${finalAttrs.version}/ChangeLog"; | ||
license = licenses.gpl3Only; | ||
maintainers = with maintainers; [ OPNA2608 ]; | ||
platforms = platforms.linux; | ||
}; | ||
}) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are sure we want to use legacy pulseaudio by default and pipewire?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UBports is using PA still, as does Debian with their Lomiri packaging. I haven't had any issues with it so far, so I see no urgency to push for PW right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pipewire has lots of nice features for example you can easily switch the BT codec without digging deep into the menues.