Merge pull request #271665 from bobby285271/upd/hypnotix

hypnotix: 3.7 -> 4.0

authored by Bobby Rong and committed by GitHub 90e47447 2db830ab

+13 -6
+13 -6
pkgs/applications/video/hypnotix/default.nix
··· 9 9 , mpv 10 10 , python3 11 11 , wrapGAppsHook 12 + , yt-dlp 12 13 }: 13 14 14 15 stdenv.mkDerivation rec { 15 16 pname = "hypnotix"; 16 - version = "3.7"; 17 + version = "4.0"; 17 18 18 19 src = fetchFromGitHub { 19 20 owner = "linuxmint"; 20 21 repo = "hypnotix"; 21 22 rev = version; 22 - hash = "sha256-H8+KJ9+HLAorGIeljw8H3N8W3E2yYhAno1xy+jI54zM="; 23 + hash = "sha256-0iJzlj5FRDXJdh+vWVvZaBJVNru7CfkvJtZUZYKoqPw="; 23 24 }; 24 25 25 26 patches = [ ··· 32 33 postPatch = '' 33 34 substituteInPlace usr/lib/hypnotix/hypnotix.py \ 34 35 --replace __DEB_VERSION__ ${version} \ 36 + --replace /usr/bin/yt-dlp ${yt-dlp}/bin/yt-dlp \ 35 37 --replace /usr/share/circle-flags-svg ${circle-flags}/share/circle-flags-svg \ 36 38 --replace /usr/share/hypnotix $out/share/hypnotix 39 + 40 + substituteInPlace usr/bin/hypnotix \ 41 + --replace /usr/lib/hypnotix/hypnotix.py $out/lib/hypnotix/hypnotix.py 37 42 ''; 38 43 39 44 nativeBuildInputs = [ ··· 47 52 48 53 buildInputs = [ 49 54 cinnamon.xapp 55 + python3 # for patchShebangs 50 56 ]; 51 57 52 58 pythonPath = with python3.pkgs; [ ··· 62 68 runHook preInstall 63 69 64 70 mkdir -p $out 65 - cp -r usr/lib $out 66 - cp -r usr/share $out 71 + cp -r usr/* $out 67 72 68 73 glib-compile-schemas $out/share/glib-2.0/schemas 69 74 ··· 72 77 73 78 preFixup = '' 74 79 buildPythonPath "$out $pythonPath" 75 - makeWrapper ${python3.interpreter} $out/bin/hypnotix \ 76 - --add-flags $out/lib/hypnotix/hypnotix.py \ 80 + 81 + # yt-dlp is needed for mpv to play YouTube channels. 82 + wrapProgram $out/bin/hypnotix \ 83 + --prefix PATH : "${lib.makeBinPath [ yt-dlp ]}" \ 77 84 --prefix PYTHONPATH : "$program_PYTHONPATH" \ 78 85 ''${gappsWrapperArgs[@]} 79 86 '';