diff options
author | Bobby Rong <rjl931189261@126.com> | 2022-11-21 20:25:30 +0800 |
---|---|---|
committer | Bobby Rong <rjl931189261@126.com> | 2022-11-29 10:11:55 +0800 |
commit | f0c5278e99749866c47a78cdb1c695d55fdabc89 (patch) | |
tree | 45f7ea86818e36b3c0a9620051d95d6d137faa75 | |
parent | 6e8d5bb296eb881abdb19f76c629e74fa61eab2f (diff) | |
download | nixpkgs-f0c5278e99749866c47a78cdb1c695d55fdabc89.tar nixpkgs-f0c5278e99749866c47a78cdb1c695d55fdabc89.tar.gz nixpkgs-f0c5278e99749866c47a78cdb1c695d55fdabc89.tar.bz2 nixpkgs-f0c5278e99749866c47a78cdb1c695d55fdabc89.tar.lz nixpkgs-f0c5278e99749866c47a78cdb1c695d55fdabc89.tar.xz nixpkgs-f0c5278e99749866c47a78cdb1c695d55fdabc89.tar.zst nixpkgs-f0c5278e99749866c47a78cdb1c695d55fdabc89.zip |
hypnotix: Fix launching with mpv 0.35.0
See hypnotix issue 254 for more info.
-rw-r--r-- | pkgs/applications/video/hypnotix/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/video/hypnotix/fix-deprecated-mpv-detach-destroy.patch | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/applications/video/hypnotix/default.nix b/pkgs/applications/video/hypnotix/default.nix index 3d5f8d4957a..20e47378b18 100644 --- a/pkgs/applications/video/hypnotix/default.nix +++ b/pkgs/applications/video/hypnotix/default.nix @@ -26,6 +26,10 @@ stdenv.mkDerivation rec { src = ./libmpv-path.patch; libmpv = "${lib.getLib mpv}/lib/libmpv${stdenv.hostPlatform.extensions.sharedLibrary}"; }) + + # Fix launching with mpv 0.35.0 (ubuntu 22.04 doesn't have libmpv.so.2) + # https://github.com/linuxmint/hypnotix/issues/254 + ./fix-deprecated-mpv-detach-destroy.patch ]; postPatch = '' diff --git a/pkgs/applications/video/hypnotix/fix-deprecated-mpv-detach-destroy.patch b/pkgs/applications/video/hypnotix/fix-deprecated-mpv-detach-destroy.patch new file mode 100644 index 00000000000..06c971b5152 --- /dev/null +++ b/pkgs/applications/video/hypnotix/fix-deprecated-mpv-detach-destroy.patch @@ -0,0 +1,22 @@ +diff --git a/usr/lib/hypnotix/mpv.py b/usr/lib/hypnotix/mpv.py +index f42a3be..db94bf6 100644 +--- a/usr/lib/hypnotix/mpv.py ++++ b/usr/lib/hypnotix/mpv.py +@@ -528,7 +528,7 @@ _mpv_create = backend.mpv_create + _handle_func('mpv_create_client', [c_char_p], MpvHandle, notnull_errcheck) + _handle_func('mpv_client_name', [], c_char_p, errcheck=None) + _handle_func('mpv_initialize', [], c_int, ec_errcheck) +-_handle_func('mpv_detach_destroy', [], None, errcheck=None) ++_handle_func('mpv_destroy', [], None, errcheck=None) + _handle_func('mpv_terminate_destroy', [], None, errcheck=None) + _handle_func('mpv_load_config_file', [c_char_p], c_int, ec_errcheck) + _handle_func('mpv_get_time_us', [], c_ulonglong, errcheck=None) +@@ -881,7 +881,7 @@ class MPV(object): + self._message_handlers[target](*args) + + if eid == MpvEventID.SHUTDOWN: +- _mpv_detach_destroy(self._event_handle) ++ _mpv_destroy(self._event_handle) + return + + except Exception as e: |