From 1e7de7c2823a9beea7103249b732f14b1b1e8f78 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 13 Mar 2022 18:35:03 +0100 Subject: nvfetcher --- user-profiles/mpv/default.nix | 62 +++++++------------------------------------ 1 file changed, 9 insertions(+), 53 deletions(-) (limited to 'user-profiles') 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 @@ -{ config, lib, userName, pkgs, ... }: +{ config, lib, userName, pkgs, sources, ... }: { home-manager.users.${userName}.programs.mpv = { enable = true; @@ -21,75 +21,31 @@ ]; }; scripts = [ - (pkgs.stdenv.mkDerivation rec { - version = "2b8a719f"; - pname = "reload"; - name = "${pname}-${version}"; - - src = pkgs.fetchFromGitHub { - owner = "4e6"; - repo = "mpv-reload"; - rev = "2b8a719fe166d6d42b5f1dd64761f97997b54a86"; - sha256 = "19ycvnwzf8vgv0g63d4k1ll6hlfrd92is9gl8hzfic7w32ycphbg"; - }; - + (pkgs.stdenv.mkDerivation (sources.mpv-reload // rec { 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}"; - - src = pkgs.fetchFromGitHub { - owner = "shinchiro"; - repo = "mpv-createchapter"; - rev = "8dd33e2debbcb963a195ec1371e02c85b49e7faa"; - hash = "sha256-rPtG7mgf7tOY8Ih4Bz1tpd4MwXOxJmngjY+s70zWX+g="; - }; - + })) + (pkgs.stdenv.mkDerivation (sources.mpv-createchapter // rec { installPhase = '' install -d $out/share/mpv/scripts install -m 0644 createchapter.lua $out/share/mpv/scripts/${passthru.scriptName} ''; passthru.scriptName = "createchapter.lua"; - }) - (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"; - }; - + })) + (pkgs.stdenv.mkDerivation (sources.mpv-autosave // rec { installPhase = '' install -d $out/share/mpv/scripts install -m 0644 autosave.lua $out/share/mpv/scripts/${passthru.scriptName} ''; passthru.scriptName = "autosave.lua"; - }) - (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"; - }; - + })) + (pkgs.stdenv.mkDerivation (sources.mpv-mpris // rec { installPhase = '' install -d $out/share/mpv/scripts install -m 0644 mpris.so $out/share/mpv/scripts/${passthru.scriptName} @@ -98,7 +54,7 @@ nativeBuildInputs = with pkgs; [ pkgconfig glib mpv ]; passthru.scriptName = "mpris.so"; - }) + })) ]; }; } -- cgit v1.2.3