refactor(mpris scripts): move src to flake.nix
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-01-01 17:34:49 -05:00
parent 19e87de889
commit 8e69d3375d
10 changed files with 25 additions and 44 deletions

Binary file not shown.

BIN
flake.nix

Binary file not shown.

View file

@ -1,4 +1,4 @@
{pkgs, ...}: {
{pkgs, ...} @ inputs: {
# For kdialog-open-files
home.packages = with pkgs; [
kdialog
@ -8,7 +8,7 @@
enable = true;
# https://github.com/mpv-player/mpv/wiki/User-Scripts
scripts = with (import ./scripts pkgs); [
scripts = with (import ./scripts inputs); [
modernx
# Dep of touch-gestures
pointer-event

View file

@ -1,10 +1,10 @@
{pkgs, ...}: let
{pkgs, ...} @ inputs: let
buildLua =
pkgs.callPackage
"${pkgs.path}/pkgs/applications/video/mpv/scripts/buildLua.nix" {};
buildLuaScript = file:
pkgs.callPackage file {inherit buildLua;};
pkgs.callPackage file (inputs // {inherit buildLua;});
in
pkgs.recurseIntoAttrs {
modernx = buildLuaScript ./modernx.nix;

View file

@ -1,6 +1,7 @@
{
fetchurl,
buildLua,
...
}:
buildLua rec {
pname = "zenity-open-files";

View file

@ -1,18 +1,14 @@
{
fetchFromGitHub,
modernx-src,
makeFontsConf,
buildLua,
...
}:
buildLua (finalAttrs: {
pname = "modernx";
version = "unstable";
version = modernx-src.rev;
src = fetchFromGitHub {
owner = "cyl0";
repo = "ModernX";
rev = "d053ea602d797bdd85d8b2275d7f606be067dc21";
hash = "sha256-Gpofl529VbmdN7eOThDAsNfNXNkUDDF82Rd+csXGOQg=";
};
src = modernx-src;
# Make font available to script
postInstall = ''

View file

@ -1,15 +1,11 @@
{
fetchFromGitHub,
persist-properties-src,
buildLua,
...
}:
buildLua {
pname = "persist-properties";
version = "unstable";
version = persist-properties-src.rev;
src = fetchFromGitHub {
owner = "d87";
repo = "mpv-persist-properties";
rev = "ddb1e6bd7a7d57da9b567ea8dc5227906f416ec6";
hash = "sha256-C2nejhkxAZgfKRl9FrZZqODq2xW6zCbv/sBiqXSAd2k=";
};
src = persist-properties-src;
}

View file

@ -1,15 +1,11 @@
{
fetchFromGitHub,
pointer-event-src,
buildLua,
...
}:
buildLua {
pname = "pointer-event";
version = "unstable";
version = pointer-event-src.rev;
src = fetchFromGitHub {
owner = "christoph-heinrich";
repo = "mpv-pointer-event";
rev = "33c5ede5977817596ace5a9942a8c801ad3b3d28";
hash = "sha256-h2E8wiQX2Vh9qyi2VsXzeOE5vnD9Xin5HZ2Wu2LZUOY=";
};
src = pointer-event-src;
}

View file

@ -1,15 +1,11 @@
{
fetchFromGitHub,
touch-gestures-src,
buildLua,
...
}:
buildLua {
pname = "touch-gestures";
version = "unstable";
version = touch-gestures-src.rev;
src = fetchFromGitHub {
owner = "christoph-heinrich";
repo = "mpv-touch-gestures";
rev = "f4aa499f038997c1824ff3bfa64ee1d5438d72f2";
hash = "sha256-gmo6sTwN85WS/+wtlylfI22LxyZH48DvXYP5JGCnyU4=";
};
src = touch-gestures-src;
}

View file

@ -1,16 +1,12 @@
{
fetchFromGitHub,
eisa-scripts-src,
buildLua,
...
}:
buildLua rec {
pname = "undo-redo";
version = "unstable";
version = eisa-scripts-src.rev;
src = fetchFromGitHub {
owner = "Eisa01";
repo = "mpv-scripts";
rev = "48d68283cea47ff8e904decc9003b3abc3e2123e";
hash = "sha256-95CAKjBRELX2f7oWSHFWJnI0mikAoxhfUphe9k51Qf4=";
};
src = eisa-scripts-src;
scriptPath = "${src}/scripts/UndoRedo.lua";
}