jellyfin-mpv-shim: use fetchPypi which includes the shader pack

This commit is contained in:
Johannes Schleifenbaum 2021-03-10 12:40:30 +01:00
parent 5854e45418
commit 474043fc5b
No known key found for this signature in database
GPG Key ID: 059093B1A278BCD0
2 changed files with 4 additions and 40 deletions

View File

@ -1,20 +1,14 @@
{ lib, buildPythonApplication, fetchFromGitHub, callPackage
{ lib, buildPythonApplication, fetchPypi
, mpv, python-mpv-jsonipc, jellyfin-apiclient-python
, pillow, tkinter, pystray, jinja2, pywebview }:
let
shaderPack = callPackage ./shader-pack.nix {};
in
buildPythonApplication rec {
pname = "jellyfin-mpv-shim";
version = "1.7.1";
src = fetchFromGitHub {
owner = "iwalton3";
repo = pname;
rev = "v${version}";
sha256 = "0alrh5h3f8pq9mrq09jmpqa0yslxsjqwij6kwn24ggbwc10zkq75";
fetchSubmodules = true; # needed for display_mirror css file
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Fo1auMiYUgJrJGJII+FfHspcke0r/VSSXzGwVNIHtEE=";
};
patches = [
@ -33,11 +27,6 @@ buildPythonApplication rec {
rm jellyfin_mpv_shim/win_utils.py
'';
postPatch = ''
# link the default shader pack
ln -s ${shaderPack} jellyfin_mpv_shim/default_shader_pack
'';
propagatedBuildInputs = [
jellyfin-apiclient-python
mpv

View File

@ -1,25 +0,0 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "jellyfin-mpv-shim-shader-pack";
version = "1.0.0";
src = fetchFromGitHub {
owner = "iwalton3";
repo = "default-shader-pack";
rev = "v${version}";
sha256 = "04y8gvjy4v3773b1kyan4dxqcf86b56x7v33m2k246jbn0rl2pgr";
};
installPhase = ''
mkdir -p $out
cp -a . $out
'';
meta = with lib; {
homepage = "https://github.com/iwalton3/default-shader-pack";
description = "Preconfigured set of MPV shaders and configurations for MPV Shim media clients";
license = with licenses; [ mit lgpl3Plus unlicense ];
maintainers = with maintainers; [ jojosch ];
};
}