summaryrefslogtreecommitdiff
path: root/user-profiles
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-03-13 18:35:03 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2022-03-13 18:35:03 +0100
commit1e7de7c2823a9beea7103249b732f14b1b1e8f78 (patch)
treeec073e219d67c52a163ae7ce2ca00737c21d2a31 /user-profiles
parent49375b980197db7b4e0d17327b52d37d6ce33f35 (diff)
downloadnixos-1e7de7c2823a9beea7103249b732f14b1b1e8f78.tar
nixos-1e7de7c2823a9beea7103249b732f14b1b1e8f78.tar.gz
nixos-1e7de7c2823a9beea7103249b732f14b1b1e8f78.tar.bz2
nixos-1e7de7c2823a9beea7103249b732f14b1b1e8f78.tar.xz
nixos-1e7de7c2823a9beea7103249b732f14b1b1e8f78.zip
nvfetcher
Diffstat (limited to 'user-profiles')
-rw-r--r--user-profiles/mpv/default.nix62
1 files changed, 9 insertions, 53 deletions
diff --git a/user-profiles/mpv/default.nix b/user-profiles/mpv/default.nix
index f6f9b8b2..4d6e3ea6 100644
--- a/user-profiles/mpv/default.nix
+++ b/user-profiles/mpv/default.nix
@@ -1,4 +1,4 @@
1{ config, lib, userName, pkgs, ... }: 1{ config, lib, userName, pkgs, sources, ... }:
2{ 2{
3 home-manager.users.${userName}.programs.mpv = { 3 home-manager.users.${userName}.programs.mpv = {
4 enable = true; 4 enable = true;
@@ -21,75 +21,31 @@
21 ]; 21 ];
22 }; 22 };
23 scripts = [ 23 scripts = [
24 (pkgs.stdenv.mkDerivation rec { 24 (pkgs.stdenv.mkDerivation (sources.mpv-reload // rec {
25 version = "2b8a719f";
26 pname = "reload";
27 name = "${pname}-${version}";
28
29 src = pkgs.fetchFromGitHub {
30 owner = "4e6";
31 repo = "mpv-reload";
32 rev = "2b8a719fe166d6d42b5f1dd64761f97997b54a86";
33 sha256 = "19ycvnwzf8vgv0g63d4k1ll6hlfrd92is9gl8hzfic7w32ycphbg";
34 };
35
36 installPhase = '' 25 installPhase = ''
37 install -d $out/share/mpv/scripts 26 install -d $out/share/mpv/scripts
38 install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName} 27 install -m 0644 reload.lua $out/share/mpv/scripts/${passthru.scriptName}
39 ''; 28 '';
40 29
41 passthru.scriptName = "reload.lua"; 30 passthru.scriptName = "reload.lua";
42 }) 31 }))
43 (pkgs.stdenv.mkDerivation rec { 32 (pkgs.stdenv.mkDerivation (sources.mpv-createchapter // rec {
44 version = "8dd33e2d";
45 pname = "createchapter";
46 name = "${pname}-${version}";
47
48 src = pkgs.fetchFromGitHub {
49 owner = "shinchiro";
50 repo = "mpv-createchapter";
51 rev = "8dd33e2debbcb963a195ec1371e02c85b49e7faa";
52 hash = "sha256-rPtG7mgf7tOY8Ih4Bz1tpd4MwXOxJmngjY+s70zWX+g=";
53 };
54
55 installPhase = '' 33 installPhase = ''
56 install -d $out/share/mpv/scripts 34 install -d $out/share/mpv/scripts
57 install -m 0644 createchapter.lua $out/share/mpv/scripts/${passthru.scriptName} 35 install -m 0644 createchapter.lua $out/share/mpv/scripts/${passthru.scriptName}
58 ''; 36 '';
59 37
60 passthru.scriptName = "createchapter.lua"; 38 passthru.scriptName = "createchapter.lua";
61 }) 39 }))
62 (pkgs.stdenv.mkDerivation rec { 40 (pkgs.stdenv.mkDerivation (sources.mpv-autosave // rec {
63 version = "744c3ee6";
64 pname = "autosave";
65 name = "${pname}-${version}.lua";
66
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";
72 };
73
74 installPhase = '' 41 installPhase = ''
75 install -d $out/share/mpv/scripts 42 install -d $out/share/mpv/scripts
76 install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName} 43 install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName}
77 ''; 44 '';
78 45
79 passthru.scriptName = "autosave.lua"; 46 passthru.scriptName = "autosave.lua";
80 }) 47 }))
81 (pkgs.stdenv.mkDerivation rec { 48 (pkgs.stdenv.mkDerivation (sources.mpv-mpris // rec {
82 version = "0.4";
83 pname = "mpv-mpris";
84 name = "${pname}-${version}.so";
85
86 src = pkgs.fetchFromGitHub {
87 owner = "hoyon";
88 repo = "mpv-mpris";
89 rev = version;
90 sha256 = "1fr3jvja8s2gdpx8qyk9r17977flms3qpm8zci62nd9r5wjdvr5i";
91 };
92
93 installPhase = '' 49 installPhase = ''
94 install -d $out/share/mpv/scripts 50 install -d $out/share/mpv/scripts
95 install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName} 51 install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName}
@@ -98,7 +54,7 @@
98 nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ]; 54 nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ];
99 55
100 passthru.scriptName = "mpris.so"; 56 passthru.scriptName = "mpris.so";
101 }) 57 }))
102 ]; 58 ];
103 }; 59 };
104} 60}