From 4a5943d61bb596eb85ca531690cb17b3353b3c22 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 26 Jan 2024 02:08:22 +0100 Subject: [PATCH] de-vendor mpv-webm --- flake.nix | 2 -- pkgs/mpv-webm.nix | 28 ---------------------------- users/pbsds/home/profiles/mpv.nix | 3 ++- 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 pkgs/mpv-webm.nix diff --git a/flake.nix b/flake.nix index 68608fe..2d1ed24 100644 --- a/flake.nix +++ b/flake.nix @@ -222,8 +222,6 @@ nixosConfigurations = mkHosts mkConfig; packages = forAllSystems ({ inputs, pkgs, lib, flakes, ... }: { - mpv-webm = pkgs.callPackage ./pkgs/mpv-webm.nix {}; # TODO: https://github.com/NixOS/nixpkgs/pull/238659, remove when i switch to 23.11 - nixos-rebuild-nom = pkgs.writeScriptBin "nixos-rebuild" '' exec ${lib.getExe pkgs.nixos-rebuild} "$@" |& ${lib.getExe pkgs.nix-output-monitor} ''; diff --git a/pkgs/mpv-webm.nix b/pkgs/mpv-webm.nix deleted file mode 100644 index dd0f96c..0000000 --- a/pkgs/mpv-webm.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ lib -, stdenvNoCC -, fetchFromGitHub -, luaPackages -}: - -stdenvNoCC.mkDerivation { - pname = "mpv-webm"; - version = "unstable-2023-02-23"; - src = fetchFromGitHub { - owner = "ekisu"; - repo = "mpv-webm"; - rev = "a18375932e39e9b2a40d9c7ab52ea367b41e2558"; - hash = "sha256-aetkQ1gU/6Yys5FJS/N06ED9tCSvL6BAgUGdNmNmpbU="; - }; - - nativeBuildInputs = [ luaPackages.moonscript ]; - - installPhase = '' - runHook preInstall - mkdir -p $out/share/mpv/scripts - install -m 644 build/webm.lua $out/share/mpv/scripts/ - runHook postInstall - ''; - - passthru.scriptName = "webm.lua"; - -} diff --git a/users/pbsds/home/profiles/mpv.nix b/users/pbsds/home/profiles/mpv.nix index c4a27f2..b123508 100644 --- a/users/pbsds/home/profiles/mpv.nix +++ b/users/pbsds/home/profiles/mpv.nix @@ -2,6 +2,7 @@ let m = pkgs.mpvScripts; + mu = pkgs.unstable.mpvScripts; a4k = lib.mkIf (m ? anime4k); in @@ -28,7 +29,7 @@ in #m.thumbnail # TOO SLOW m.thumbfast m.mpris - (m.mpv-webm or flakes.self.pkgs.mpv-webm) # activate with SHIFT+W + (m.mpv-webm or mu.mpv-webm) # activate with SHIFT+W # from https://github.com/mpv-player/mpv/issues/9767#issuecomment-1024831645 ({ scriptName = "dynamic-subs.lua"; } // (pkgs.writeTextDir "share/mpv/scripts/dynamic-subs.lua" '' mp.add_hook('on_load', 10, function()