diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-03-01 13:45:50 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-03-01 13:45:50 +0100 |
commit | aa0b1edf92b7e056e956a46316a9fb2f6d01504b (patch) | |
tree | 82372e41d27d61747d006d8723af5249b1dea3cf /user-profiles/mpv | |
parent | a3b0302b602dbdb78b2b4b0b2372a2e2d4765132 (diff) | |
download | nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.tar nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.tar.gz nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.tar.bz2 nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.tar.xz nixos-aa0b1edf92b7e056e956a46316a9fb2f6d01504b.zip |
gkleen@sif: ...
Diffstat (limited to 'user-profiles/mpv')
-rw-r--r-- | user-profiles/mpv/default.nix | 120 |
1 files changed, 68 insertions, 52 deletions
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 @@ | |||
20 | "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp" | 20 | "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp" |
21 | ]; | 21 | ]; |
22 | }; | 22 | }; |
23 | scripts = let | 23 | scripts = [ |
24 | reload = pkgs.stdenv.mkDerivation rec { | 24 | (pkgs.stdenv.mkDerivation rec { |
25 | version = "2b8a719f"; | 25 | version = "2b8a719f"; |
26 | pname = "reload"; | 26 | pname = "reload"; |
27 | name = "${pname}-${version}"; | 27 | name = "${pname}-${version}"; |
28 | 28 | ||
29 | src = pkgs.fetchFromGitHub { | 29 | src = pkgs.fetchFromGitHub { |
30 | owner = "4e6"; | 30 | owner = "4e6"; |
31 | repo = "mpv-reload"; | 31 | repo = "mpv-reload"; |
32 | rev = "2b8a719fe166d6d42b5f1dd64761f97997b54a86"; | 32 | rev = "2b8a719fe166d6d42b5f1dd64761f97997b54a86"; |
33 | sha256 = "19ycvnwzf8vgv0g63d4k1ll6hlfrd92is9gl8hzfic7w32ycphbg"; | 33 | sha256 = "19ycvnwzf8vgv0g63d4k1ll6hlfrd92is9gl8hzfic7w32ycphbg"; |
34 | }; | 34 | }; |
35 | |||
36 | installPhase = '' | ||
37 | install -d $out/share/mpv/scripts | ||
38 | install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName} | ||
39 | ''; | ||
35 | 40 | ||
36 | installPhase = '' | 41 | passthru.scriptName = "reload.lua"; |
37 | install -d $out/share/mpv/scripts | 42 | }) |
38 | install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName} | 43 | (pkgs.stdenv.mkDerivation rec { |
39 | ''; | 44 | version = "8dd33e2d"; |
45 | pname = "createchapter"; | ||
46 | name = "${pname}-${version}"; | ||
40 | 47 | ||
41 | passthru.scriptName = "reload.lua"; | 48 | src = pkgs.fetchFromGitHub { |
49 | owner = "shinchiro"; | ||
50 | repo = "mpv-createchapter"; | ||
51 | rev = "8dd33e2debbcb963a195ec1371e02c85b49e7faa"; | ||
52 | hash = "sha256-rPtG7mgf7tOY8Ih4Bz1tpd4MwXOxJmngjY+s70zWX+g="; | ||
42 | }; | 53 | }; |
43 | autosave = pkgs.stdenv.mkDerivation rec { | ||
44 | version = "744c3ee6"; | ||
45 | pname = "autosave"; | ||
46 | name = "${pname}-${version}.lua"; | ||
47 | 54 | ||
48 | src = pkgs.fetchzip { | 55 | installPhase = '' |
49 | url = "https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef/archive/744c3ee61d2f0a8e9bb4e308dec6897215ae4704.zip"; | 56 | install -d $out/share/mpv/scripts |
50 | hash = "sha256-yxA8wgzdS7SyKLoNTWN87ShsBfPKUflbOu4Y0jS2G3I="; | 57 | install -m 0644 createchapter.lua $out/share/mpv/scripts/${passthru.scriptName} |
51 | # url = "https://gist.github.com/Hakkin/5489e511bd6c8068a0fc09304c9c5a82/archive/7a19f7cdb6dd0b1c6878b41e13b244e2503c15fc.zip"; | 58 | ''; |
52 | # sha256 = "0bv9wjrqm2ragd7rp8vw768bja2ghascwlljd6rzzf2ybi10fxs2"; | ||
53 | }; | ||
54 | 59 | ||
55 | installPhase = '' | 60 | passthru.scriptName = "createchapter.lua"; |
56 | install -d $out/share/mpv/scripts | 61 | }) |
57 | install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName} | 62 | (pkgs.stdenv.mkDerivation rec { |
58 | ''; | 63 | version = "744c3ee6"; |
64 | pname = "autosave"; | ||
65 | name = "${pname}-${version}.lua"; | ||
59 | 66 | ||
60 | passthru.scriptName = "autosave.lua"; | 67 | src = pkgs.fetchzip { |
68 | url = "https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef/archive/744c3ee61d2f0a8e9bb4e308dec6897215ae4704.zip"; | ||
69 | hash = "sha256-yxA8wgzdS7SyKLoNTWN87ShsBfPKUflbOu4Y0jS2G3I="; | ||
70 | # url = "https://gist.github.com/Hakkin/5489e511bd6c8068a0fc09304c9c5a82/archive/7a19f7cdb6dd0b1c6878b41e13b244e2503c15fc.zip"; | ||
71 | # sha256 = "0bv9wjrqm2ragd7rp8vw768bja2ghascwlljd6rzzf2ybi10fxs2"; | ||
61 | }; | 72 | }; |
62 | mpris = pkgs.stdenv.mkDerivation rec { | ||
63 | version = "0.4"; | ||
64 | pname = "mpv-mpris"; | ||
65 | name = "${pname}-${version}.so"; | ||
66 | |||
67 | src = pkgs.fetchFromGitHub { | ||
68 | owner = "hoyon"; | ||
69 | repo = "mpv-mpris"; | ||
70 | rev = version; | ||
71 | sha256 = "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i"; | ||
72 | }; | ||
73 | 73 | ||
74 | installPhase = '' | 74 | installPhase = '' |
75 | install -d $out/share/mpv/scripts | 75 | install -d $out/share/mpv/scripts |
76 | install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName} | 76 | install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName} |
77 | ''; | 77 | ''; |
78 | 78 | ||
79 | nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ]; | 79 | passthru.scriptName = "autosave.lua"; |
80 | }) | ||
81 | (pkgs.stdenv.mkDerivation rec { | ||
82 | version = "0.4"; | ||
83 | pname = "mpv-mpris"; | ||
84 | name = "${pname}-${version}.so"; | ||
80 | 85 | ||
81 | passthru.scriptName = "mpris.so"; | 86 | src = pkgs.fetchFromGitHub { |
87 | owner = "hoyon"; | ||
88 | repo = "mpv-mpris"; | ||
89 | rev = version; | ||
90 | sha256 = "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i"; | ||
82 | }; | 91 | }; |
83 | in [ reload | 92 | |
84 | autosave | 93 | installPhase = '' |
85 | mpris | 94 | install -d $out/share/mpv/scripts |
86 | ]; | 95 | install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName} |
96 | ''; | ||
97 | |||
98 | nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ]; | ||
99 | |||
100 | passthru.scriptName = "mpris.so"; | ||
101 | }) | ||
102 | ]; | ||
87 | }; | 103 | }; |
88 | } | 104 | } |