Unverified Commit b9849714 authored by Coutinho de Souza's avatar Coutinho de Souza
Browse files

sponsorblock-minimal: replace sha256sum with nix store path

Also format the file with nixfmt and replace `--replace` option with
`--replace-fail`.
parent 26e7632d
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
{ lib
, buildLua
, fetchFromGitea
, unstableGitUpdater
, curl
}:
{ lib, buildLua, fetchFromGitea, unstableGitUpdater, curl, coreutils }:

buildLua {
  pname = "mpv_sponsorblock_minimal";
@@ -21,11 +16,13 @@ buildLua {

  preInstall = ''
    substituteInPlace sponsorblock_minimal.lua \
      --replace "curl" "${lib.getExe curl}"
      --replace-fail "curl" "${lib.getExe curl}" \
      --replace-fail "sha256sum" "${lib.getExe' coreutils "sha256sum"}"
  '';

  meta = with lib; {
    description = "A minimal script to skip sponsored segments of YouTube videos";
    description =
      "A minimal script to skip sponsored segments of YouTube videos";
    homepage = "https://codeberg.org/jouni/mpv_sponsorblock_minimal";
    license = licenses.gpl3Only;
    platforms = platforms.all;