fix mpv global config dir

main
xenofem 2023-04-23 01:00:01 -04:00
parent 0047c5f9be
commit 6f73a7d50c
2 changed files with 22 additions and 2 deletions

13
confdir.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/meson.build b/meson.build
index 4aada48731..39a37853de 100644
--- a/meson.build
+++ b/meson.build
@@ -1655,7 +1655,7 @@ sys.stdout.write(features)
'''
feature_str = run_command(python, '-c', feature_sort, feature_keys, check: true).stdout()
conf_data.set_quoted('FULLCONFIG', feature_str)
-conf_data.set_quoted('MPV_CONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpv'))
+conf_data.set_quoted('MPV_CONFDIR', '/etc/mpv')
conf_data.set_quoted('PLATFORM', host_machine.system())
configure_file(output : 'config.h', configuration : conf_data)
message('List of enabled features: ' + feature_str)

View File

@ -46,8 +46,15 @@
packages // rec {
overlays.default = final: prev: let
newScripts = packages.packages.${prev.system};
in {
mpv = prev.mpv.override { scripts = builtins.attrValues newScripts; };
in rec {
mpv-unwrapped = prev.mpv-unwrapped.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or []) ++ [
./confdir.patch
];
});
mpv = prev.wrapMpv mpv-unwrapped {
scripts = builtins.attrValues newScripts;
};
mpvScripts = prev.mpvScripts // newScripts;
};