diff options
Diffstat (limited to 'pkgs/applications/video')
-rw-r--r-- | pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/video/mpv/scripts/buildLua.nix | 30 | ||||
-rw-r--r-- | pkgs/applications/video/mpv/scripts/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/video/mpv/scripts/uosc.nix | 50 | ||||
-rw-r--r-- | pkgs/applications/video/rtabmap/default.nix | 14 |
5 files changed, 60 insertions, 40 deletions
diff --git a/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix b/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix index ba6470af873f..28dd626502e8 100644 --- a/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix +++ b/pkgs/applications/video/kodi/addons/pvr-iptvsimple/default.nix @@ -6,13 +6,13 @@ buildKodiBinaryAddon rec { pname = "pvr-iptvsimple"; namespace = "pvr.iptvsimple"; - version = "20.11.1"; + version = "20.13.0"; src = fetchFromGitHub { owner = "kodi-pvr"; repo = "pvr.iptvsimple"; rev = "${version}-${rel}"; - sha256 = "sha256-Dvnuy+2xW9hPjPVqN7X057B/1zWqIPbkS90kjexJvio="; + sha256 = "sha256-W/tFM/WpWdSvLEf0iwQoH2JVDjyfr1l8CRQkOG5q4hk="; }; extraBuildInputs = [ diff --git a/pkgs/applications/video/mpv/scripts/buildLua.nix b/pkgs/applications/video/mpv/scripts/buildLua.nix index 046b0fa2ea96..4c1e1957c097 100644 --- a/pkgs/applications/video/mpv/scripts/buildLua.nix +++ b/pkgs/applications/video/mpv/scripts/buildLua.nix @@ -5,31 +5,29 @@ let inherit (lib) hasPrefix hasSuffix removeSuffix; escapedList = with lib; concatMapStringsSep " " (s: "'${escape [ "'" ] s}'"); fileName = pathStr: lib.last (lib.splitString "/" pathStr); - nameFromPath = pathStr: - let fN = fileName pathStr; in - if hasSuffix ".lua" fN then - fN - else if !(hasPrefix "." fN) then - "${fN}.lua" - else - null - ; scriptsDir = "$out/share/mpv/scripts"; + + # similar to `lib.extends`, but with inverted precedence and recursive update + extendedBy = args: orig: self: + let super = args self; + in lib.recursiveUpdate (orig super) super + ; in -lib.makeOverridable ( + +lib.makeOverridable (args: stdenvNoCC.mkDerivation (extendedBy + (if lib.isFunction args then args else (_: args)) ( { pname , extraScripts ? [] , ... }@args: let # either passthru.scriptName, inferred from scriptPath, or from pname scriptName = (args.passthru or {}).scriptName or ( - if args ? scriptPath && nameFromPath args.scriptPath != null - then nameFromPath args.scriptPath + if args ? scriptPath + then fileName args.scriptPath else "${pname}.lua" ); scriptPath = args.scriptPath or "./${scriptName}"; - in - stdenvNoCC.mkDerivation (lib.attrsets.recursiveUpdate { + in { dontBuild = true; preferLocalBuild = true; @@ -59,5 +57,5 @@ lib.makeOverridable ( passthru = { inherit scriptName; }; meta.platforms = lib.platforms.all; - } args) -) + }) +)) diff --git a/pkgs/applications/video/mpv/scripts/default.nix b/pkgs/applications/video/mpv/scripts/default.nix index fb75464ab98e..4083c52b3d90 100644 --- a/pkgs/applications/video/mpv/scripts/default.nix +++ b/pkgs/applications/video/mpv/scripts/default.nix @@ -22,7 +22,7 @@ in lib.recurseIntoAttrs sponsorblock = callPackage ./sponsorblock.nix { }; thumbfast = callPackage ./thumbfast.nix { inherit buildLua; }; thumbnail = callPackage ./thumbnail.nix { inherit buildLua; }; - uosc = callPackage ./uosc.nix { }; + uosc = callPackage ./uosc.nix { inherit buildLua; }; visualizer = callPackage ./visualizer.nix { }; vr-reversal = callPackage ./vr-reversal.nix { }; webtorrent-mpv-hook = callPackage ./webtorrent-mpv-hook.nix { }; diff --git a/pkgs/applications/video/mpv/scripts/uosc.nix b/pkgs/applications/video/mpv/scripts/uosc.nix index b88cd2c5b968..4c434d49f368 100644 --- a/pkgs/applications/video/mpv/scripts/uosc.nix +++ b/pkgs/applications/video/mpv/scripts/uosc.nix @@ -1,42 +1,50 @@ -{ stdenvNoCC, lib, fetchFromGitHub, makeFontsConf }: - -stdenvNoCC.mkDerivation (finalAttrs: { +{ lib +, fetchFromGitHub +, fetchpatch +, makeFontsConf +, buildLua +, buildGoModule +}: + +buildLua (finalAttrs: { pname = "uosc"; - version = "4.7.0"; + version = "5.1.1"; + scriptPath = "src/uosc"; src = fetchFromGitHub { owner = "tomasklaen"; repo = "uosc"; rev = finalAttrs.version; - hash = "sha256-JqlBjhwRgmXl6XfHYTwtNWZj656EDHjcdWOlCgihF5I="; + hash = "sha256-+4k8T1yX3IRXK3XkUShsuJSH9w1Zla7CaRENcIqX4iM="; }; - postPatch = '' - substituteInPlace scripts/uosc.lua \ - --replace "mp.find_config_file('scripts')" "\"$out/share/mpv/scripts\"" - ''; - - dontBuild = true; - - installPhase = '' - runHook preInstall - - mkdir -p $out/share/mpv/ - cp -r scripts $out/share/mpv - cp -r fonts $out/share + tools = buildGoModule { + pname = "uosc-bin"; + inherit (finalAttrs) version src; + vendorHash = "sha256-nkY0z2GiDxfNs98dpe+wZNI3dAXcuHaD/nHiZ2XnZ1Y="; + }; - runHook postInstall - ''; + # Patch lua script to get the path to its `ziggy` binary form the environment + patches = [ + # uosc#814: Support overriding `ziggy_path` via environment variable + (fetchpatch { + url = "https://github.com/tomasklaen/uosc/commit/4fdf68a1bcb510824d66f35ecc7672a6452a44b2.patch"; + hash = "sha256-igUqFf8e7LVIIjGxACdIWAeZxjF/yqaCL4QRXrzNQXk="; + }) + ]; - passthru.scriptName = "uosc.lua"; # the script uses custom "texture" fonts as the background for ui elements. # In order for mpv to find them, we need to adjust the fontconfig search path. + postInstall = "cp -r src/fonts $out/share"; passthru.extraWrapperArgs = [ "--set" "FONTCONFIG_FILE" (toString (makeFontsConf { fontDirectories = [ "${finalAttrs.finalPackage}/share/fonts" ]; })) + "--set" + "MPV_UOSC_ZIGGY" + (lib.getExe' finalAttrs.tools "ziggy") ]; meta = with lib; { diff --git a/pkgs/applications/video/rtabmap/default.nix b/pkgs/applications/video/rtabmap/default.nix index ecfd8a676bca..200fab274339 100644 --- a/pkgs/applications/video/rtabmap/default.nix +++ b/pkgs/applications/video/rtabmap/default.nix @@ -1,6 +1,7 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , pkg-config , cmake , opencv @@ -35,6 +36,19 @@ stdenv.mkDerivation rec { hash = "sha256-1xb8O3VrErldid2OgAUMG28mSUO7QBUsPuSz8p03tSI"; }; + patches = [ + # Fix build with g2o 20230806 + (fetchpatch { + url = "https://github.com/introlab/rtabmap/commit/85cc6fe3c742855ad16c8442895e12dbb10b6e8b.patch"; + hash = "sha256-P6GkYKCNwe9dgZdgF/oEhgjA3bJnwXFWJCPoyIknQCo="; + }) + # Fix typo in previous patch + (fetchpatch { + url = "https://github.com/introlab/rtabmap/commit/c4e94bcdc31b859c1049724dbb7671e4597d86de.patch"; + hash = "sha256-1btkV4/y+bnF3xEVqlUy/9F6BoANeTOEJjZLmRzG3iA="; + }) + ]; + nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook wrapGAppsHook ]; buildInputs = [ ## Required |