From aa0b1edf92b7e056e956a46316a9fb2f6d01504b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 1 Mar 2022 13:45:50 +0100 Subject: gkleen@sif: ... --- user-profiles/mpv/default.nix | 120 ++++++++++++++++++++++++------------------ 1 file changed, 68 insertions(+), 52 deletions(-) (limited to 'user-profiles/mpv/default.nix') diff --git a/user-profiles/mpv/default.nix b/user-profiles/mpv/default.nix index 3386ca5f..f6f9b8b2 100644 --- a/user-profiles/mpv/default.nix +++ b/user-profiles/mpv/default.nix @@ -20,69 +20,85 @@ "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp" ]; }; - scripts = let - reload = pkgs.stdenv.mkDerivation rec { - version = "2b8a719f"; - pname = "reload"; - name = "${pname}-${version}"; + scripts = [ + (pkgs.stdenv.mkDerivation rec { + version = "2b8a719f"; + pname = "reload"; + name = "${pname}-${version}"; - src = pkgs.fetchFromGitHub { - owner = "4e6"; - repo = "mpv-reload"; - rev = "2b8a719fe166d6d42b5f1dd64761f97997b54a86"; - sha256 = "19ycvnwzf8vgv0g63d4k1ll6hlfrd92is9gl8hzfic7w32ycphbg"; - }; + src = pkgs.fetchFromGitHub { + owner = "4e6"; + repo = "mpv-reload"; + rev = "2b8a719fe166d6d42b5f1dd64761f97997b54a86"; + sha256 = "19ycvnwzf8vgv0g63d4k1ll6hlfrd92is9gl8hzfic7w32ycphbg"; + }; + + installPhase = '' + install -d $out/share/mpv/scripts + install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName} + ''; - installPhase = '' - install -d $out/share/mpv/scripts - install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName} - ''; + passthru.scriptName = "reload.lua"; + }) + (pkgs.stdenv.mkDerivation rec { + version = "8dd33e2d"; + pname = "createchapter"; + name = "${pname}-${version}"; - passthru.scriptName = "reload.lua"; + src = pkgs.fetchFromGitHub { + owner = "shinchiro"; + repo = "mpv-createchapter"; + rev = "8dd33e2debbcb963a195ec1371e02c85b49e7faa"; + hash = "sha256-rPtG7mgf7tOY8Ih4Bz1tpd4MwXOxJmngjY+s70zWX+g="; }; - autosave = pkgs.stdenv.mkDerivation rec { - version = "744c3ee6"; - pname = "autosave"; - name = "${pname}-${version}.lua"; - src = pkgs.fetchzip { - url = "https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef/archive/744c3ee61d2f0a8e9bb4e308dec6897215ae4704.zip"; - hash = "sha256-yxA8wgzdS7SyKLoNTWN87ShsBfPKUflbOu4Y0jS2G3I="; - # url = "https://gist.github.com/Hakkin/5489e511bd6c8068a0fc09304c9c5a82/archive/7a19f7cdb6dd0b1c6878b41e13b244e2503c15fc.zip"; - # sha256 = "0bv9wjrqm2ragd7rp8vw768bja2ghascwlljd6rzzf2ybi10fxs2"; - }; + installPhase = '' + install -d $out/share/mpv/scripts + install -m 0644 createchapter.lua $out/share/mpv/scripts/${passthru.scriptName} + ''; - installPhase = '' - install -d $out/share/mpv/scripts - install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName} - ''; + passthru.scriptName = "createchapter.lua"; + }) + (pkgs.stdenv.mkDerivation rec { + version = "744c3ee6"; + pname = "autosave"; + name = "${pname}-${version}.lua"; - passthru.scriptName = "autosave.lua"; + src = pkgs.fetchzip { + url = "https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef/archive/744c3ee61d2f0a8e9bb4e308dec6897215ae4704.zip"; + hash = "sha256-yxA8wgzdS7SyKLoNTWN87ShsBfPKUflbOu4Y0jS2G3I="; + # url = "https://gist.github.com/Hakkin/5489e511bd6c8068a0fc09304c9c5a82/archive/7a19f7cdb6dd0b1c6878b41e13b244e2503c15fc.zip"; + # sha256 = "0bv9wjrqm2ragd7rp8vw768bja2ghascwlljd6rzzf2ybi10fxs2"; }; - mpris = pkgs.stdenv.mkDerivation rec { - version = "0.4"; - pname = "mpv-mpris"; - name = "${pname}-${version}.so"; - - src = pkgs.fetchFromGitHub { - owner = "hoyon"; - repo = "mpv-mpris"; - rev = version; - sha256 = "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i"; - }; - installPhase = '' - install -d $out/share/mpv/scripts - install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName} - ''; + installPhase = '' + install -d $out/share/mpv/scripts + install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName} + ''; - nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ]; + passthru.scriptName = "autosave.lua"; + }) + (pkgs.stdenv.mkDerivation rec { + version = "0.4"; + pname = "mpv-mpris"; + name = "${pname}-${version}.so"; - passthru.scriptName = "mpris.so"; + src = pkgs.fetchFromGitHub { + owner = "hoyon"; + repo = "mpv-mpris"; + rev = version; + sha256 = "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i"; }; - in [ reload - autosave - mpris - ]; + + installPhase = '' + install -d $out/share/mpv/scripts + install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName} + ''; + + nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ]; + + passthru.scriptName = "mpris.so"; + }) + ]; }; } -- cgit v1.2.3