swaynotificationcenter: 0.9.0 -> 0.10.0 (#290627)

This commit is contained in:
Matthieu Coudron 2024-02-26 22:10:30 +01:00 committed by GitHub
parent f53c775852
commit e6732335ff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 58 deletions

View file

@ -1,50 +0,0 @@
diff --git a/src/functions.vala b/src/functions.vala
index cf7fefc..9b4d82a 100644
--- a/src/functions.vala
+++ b/src/functions.vala
@@ -102,10 +102,7 @@ namespace SwayNotificationCenter {
public static string get_style_path (owned string ? custom_path,
bool only_system = false) {
- string[] paths = {
- // Fallback location. Specified in postinstall.py
- "/usr/local/etc/xdg/swaync/style.css"
- };
+ string[] paths = {};
if (custom_path != null && custom_path.length > 0) {
// Replaces the home directory relative path with a absolute path
if (custom_path.get (0) == '~') {
@@ -123,7 +120,9 @@ namespace SwayNotificationCenter {
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
path, "swaync/style.css");
}
-
+ // Fallback location. Specified in postinstall.py. Mostly for Debian
+ paths += "/usr/local/etc/xdg/swaync/style.css";
+
string path = "";
foreach (string try_path in paths) {
if (File.new_for_path (try_path).query_exists ()) {
@@ -140,10 +139,7 @@ namespace SwayNotificationCenter {
}
public static string get_config_path (owned string ? custom_path) {
- string[] paths = {
- // Fallback location. Specified in postinstall.py
- "/usr/local/etc/xdg/swaync/config.json"
- };
+ string[] paths = {};
if (custom_path != null && custom_path.length > 0) {
// Replaces the home directory relative path with a absolute path
if (custom_path.get (0) == '~') {
@@ -158,7 +154,9 @@ namespace SwayNotificationCenter {
paths += Path.build_path (Path.DIR_SEPARATOR.to_string (),
path, "swaync/config.json");
}
-
+ // Fallback location. Specified in postinstall.py. Mostly for Debian
+ paths += "/usr/local/etc/xdg/swaync/config.json";
+
string path = "";
foreach (string try_path in paths) {
if (File.new_for_path (try_path).query_exists ()) {

View file

@ -24,23 +24,21 @@
, scdoc
, vala
, xvfb-run
, sassc
, pantheon
}:
stdenv.mkDerivation (finalAttrs: rec {
pname = "SwayNotificationCenter";
version = "0.9.0";
version = "0.10.0";
src = fetchFromGitHub {
owner = "ErikReider";
repo = pname;
rev = "v${version}";
hash = "sha256-mwwSTs4d9jUXUy33nSYJCRFlpH6naCmbRUSpfVacMBE=";
hash = "sha256-7O+DX4uuncUqx5zEKQprZE6tctteT6NU01V2EBHiFqA=";
};
patches = [
./001-backport-pr296.patch
];
nativeBuildInputs = [
bash-completion
# cmake # currently conflicts with meson
@ -51,6 +49,8 @@ stdenv.mkDerivation (finalAttrs: rec {
ninja
pkg-config
python3
sassc
pantheon.granite
scdoc
vala
wrapGAppsHook
@ -74,8 +74,6 @@ stdenv.mkDerivation (finalAttrs: rec {
postPatch = ''
chmod +x build-aux/meson/postinstall.py
patchShebangs build-aux/meson/postinstall.py
substituteInPlace src/functions.vala --replace /usr/local/etc $out/etc
'';
passthru.tests.version = testers.testVersion {