about summary refs log tree commit diff
diff options
context:
space:
mode:
authornicoo <nicoo@mur.at>2023-11-29 13:24:05 +0000
committernicoo <nicoo@mur.at>2023-12-04 17:07:46 +0000
commit492f662817bfd1191b409fb7ee09cf6af847361b (patch)
treed96f04114c81b340d67788a52ad19785fb49d895
parentce2dcc6dcb6bdbb6c1be5799ac14aa4874a8739c (diff)
downloadnixlib-492f662817bfd1191b409fb7ee09cf6af847361b.tar
nixlib-492f662817bfd1191b409fb7ee09cf6af847361b.tar.gz
nixlib-492f662817bfd1191b409fb7ee09cf6af847361b.tar.bz2
nixlib-492f662817bfd1191b409fb7ee09cf6af847361b.tar.lz
nixlib-492f662817bfd1191b409fb7ee09cf6af847361b.tar.xz
nixlib-492f662817bfd1191b409fb7ee09cf6af847361b.tar.zst
nixlib-492f662817bfd1191b409fb7ee09cf6af847361b.zip
mpvScripts.uosc: refactor with `buildLua`
-rw-r--r--pkgs/applications/video/mpv/scripts/default.nix2
-rw-r--r--pkgs/applications/video/mpv/scripts/uosc.nix17
2 files changed, 6 insertions, 13 deletions
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..311b31549ca7 100644
--- a/pkgs/applications/video/mpv/scripts/uosc.nix
+++ b/pkgs/applications/video/mpv/scripts/uosc.nix
@@ -1,6 +1,6 @@
-{ stdenvNoCC, lib, fetchFromGitHub, makeFontsConf }:
+{ buildLua, lib, fetchFromGitHub, makeFontsConf }:
 
-stdenvNoCC.mkDerivation (finalAttrs: {
+buildLua (finalAttrs: {
   pname = "uosc";
   version = "4.7.0";
 
@@ -16,19 +16,12 @@ stdenvNoCC.mkDerivation (finalAttrs: {
       --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
+  scriptPath = "scripts/uosc.lua";
+  postInstall = ''
+    cp -r scripts/uosc_shared $out/share/mpv/
     cp -r fonts $out/share
-
-    runHook postInstall
   '';
 
-  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.
   passthru.extraWrapperArgs = [