Merge pull request #141299 from dotlambda/libadwaita-1.0.0.alpha.3

libadwaita: 1.0.0-alpha.2 -> 1.0.0.alpha.3
This commit is contained in:
Jan Tojnar 2021-10-15 17:03:15 +02:00 committed by GitHub
commit 85ec600026
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 5 deletions

View File

@ -1,6 +1,7 @@
{ lib
, python3
, fetchFromGitHub
, substituteAll
, appstream-glib
, desktop-file-utils
, gettext
@ -13,12 +14,13 @@
, meson
, ninja
, pkg-config
, pulseaudio
, wrapGAppsHook
}:
python3.pkgs.buildPythonApplication rec {
pname = "mousai";
version = "0.4.2";
version = "0.6.6";
format = "other";
@ -26,9 +28,16 @@ python3.pkgs.buildPythonApplication rec {
owner = "SeaDve";
repo = "Mousai";
rev = "v${version}";
sha256 = "sha256-zH++GGFIz3oxkKOYB4zhY6yL3vENEXxtrv8mZZ+41kU=";
sha256 = "sha256-nCbFVFg+nVF8BOBfdzQVgdTRXR5UF18PJFC266yTFwg=";
};
patches = [
(substituteAll {
src = ./paths.patch;
pactl = "${lib.getBin pulseaudio}/bin/pactl";
})
];
postPatch = ''
patchShebangs build-aux/meson
'';
@ -53,6 +62,7 @@ python3.pkgs.buildPythonApplication rec {
gtk4
libadwaita
librsvg
pulseaudio
];
propagatedBuildInputs = with python3.pkgs; [

View File

@ -0,0 +1,13 @@
diff --git a/src/backend/utils.py b/src/backend/utils.py
index cebc009..0087c09 100644
--- a/src/backend/utils.py
+++ b/src/backend/utils.py
@@ -79,7 +79,7 @@ class Utils:
@staticmethod
def get_default_audio_sources():
pactl_output = subprocess.run(
- ['/usr/bin/pactl', 'info'],
+ ['@pactl@', 'info'],
stdout=subprocess.PIPE,
text=True
).stdout.splitlines()

View File

@ -12,13 +12,16 @@
, vala
, gobject-introspection
, fribidi
, glib
, gtk4
, gnome
, gsettings-desktop-schemas
, xvfb-run
}:
stdenv.mkDerivation rec {
pname = "libadwaita";
version = "1.0.0-alpha.2";
version = "1.0.0.alpha.3";
outputs = [ "out" "dev" "devdoc" ];
outputBin = "devdoc"; # demo app
@ -28,7 +31,7 @@ stdenv.mkDerivation rec {
owner = "GNOME";
repo = "libadwaita";
rev = version;
sha256 = "1yvjdzs5ipmr4gi0l4k6dkqhl9b090kpjc3ll8bv1a6i7yfaf53s";
sha256 = "sha256-4ED2m8hZMWbu5sFbkH0W6q05+cYCCkx+ubeDqg3W3a0=";
};
nativeBuildInputs = [
@ -54,13 +57,31 @@ stdenv.mkDerivation rec {
];
checkInputs = [
gnome.adwaita-icon-theme
xvfb-run
];
doCheck = true;
checkPhase = ''
xvfb-run meson test
runHook preCheck
testEnvironment=(
# Disable portal since we cannot run it in tests.
ADW_DISABLE_PORTAL=1
# AdwSettings needs to be initialized from “org.gnome.desktop.interface” GSettings schema when portal is not used for color scheme.
# It will not actually be used since the “color-scheme” key will only have been introduced in GNOME 42, falling back to detecting theme name.
# See adw_settings_constructed function in https://gitlab.gnome.org/GNOME/libadwaita/commit/60ec69f0a5d49cad8a6d79e4ecefd06dc6e3db12
"XDG_DATA_DIRS=${glib.getSchemaPath gsettings-desktop-schemas}/../.."
# Tests need a cache directory
"HOME=$TMPDIR"
)
env "''${testEnvironment[@]}" xvfb-run \
meson test --print-errorlogs
runHook postCheck
'';
postInstall = ''