Merge pull request #208214 from fgaz/yewtube/init
yewtube: init at 2.9.0, replace mps-youtube
This commit is contained in:
commit
942d81e6a2
7 changed files with 52 additions and 61 deletions
|
@ -1,34 +0,0 @@
|
|||
{ lib, python3Packages, fetchFromGitHub }:
|
||||
|
||||
with python3Packages;
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "mps-youtube";
|
||||
version = "unstable-2020-01-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mps-youtube";
|
||||
repo = "mps-youtube";
|
||||
rev = "b808697133ec2ad7654953232d1e841b20aa7cc3";
|
||||
sha256 = "0lqprlpc0v092xqkjc0cc395ag45lijwgd34dpg2jy6i0f2szywv";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pafy ];
|
||||
|
||||
# disabled due to error in loading unittest
|
||||
# don't know how to make test from: <mps_youtube. ...>
|
||||
doCheck = false;
|
||||
|
||||
# before check create a directory and redirect XDG_CONFIG_HOME to it
|
||||
preCheck = ''
|
||||
mkdir -p check-phase
|
||||
export XDG_CONFIG_HOME=$(pwd)/check-phase
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Terminal based YouTube player and downloader";
|
||||
homepage = "https://github.com/mps-youtube/mps-youtube";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ koral odi ];
|
||||
};
|
||||
}
|
48
pkgs/applications/misc/yewtube/default.nix
Normal file
48
pkgs/applications/misc/yewtube/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ lib, python3Packages, fetchFromGitHub }:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "yewtube";
|
||||
version = "2.9.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "iamtalhaasghar";
|
||||
repo = "yewtube";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-8GL2ZvRHtnnLZ07nQk3irJUj+XLL+pyUUA+JJPICPRA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# Don't try to detect the version at runtime with pip
|
||||
substituteInPlace mps_youtube/__init__.py \
|
||||
--replace "from pip._vendor import pkg_resources" "" \
|
||||
--replace "__version__ =" "__version__ = '${version}' #"
|
||||
# https://github.com/iamtalhaasghar/yewtube/pull/105
|
||||
sed -ie '/pyreadline/d' requirements.txt
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
pyperclip
|
||||
requests
|
||||
youtube-search-python
|
||||
yt-dlp
|
||||
];
|
||||
|
||||
checkInputs = with python3Packages; [
|
||||
pytestCheckHook
|
||||
dbus-python
|
||||
pygobject3
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export XDG_CONFIG_HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "mps_youtube" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Terminal based YouTube player and downloader, forked from mps-youtube";
|
||||
homepage = "https://github.com/iamtalhaasghar/yewtube";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ fgaz koral ];
|
||||
};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{ lib, buildPythonPackage, youtube-dl, fetchPypi }:
|
||||
buildPythonPackage rec {
|
||||
pname = "pafy";
|
||||
version = "0.5.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "364f1d1312c89582d97dc7225cf6858cde27cb11dfd64a9c2bab1a2f32133b1e";
|
||||
};
|
||||
|
||||
# No tests included in archive
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = [ youtube-dl ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A library to download YouTube content and retrieve metadata";
|
||||
homepage = "https://github.com/mps-youtube/pafy";
|
||||
license = licenses.lgpl3Plus;
|
||||
maintainers = with maintainers; [ odi ];
|
||||
};
|
||||
}
|
||||
|
|
@ -980,6 +980,7 @@ mapAliases ({
|
|||
mpc_cli = mpc-cli; # moved from top-level 2022-01-24
|
||||
mpd_clientlib = libmpdclient; # Added 2021-02-11
|
||||
mpich2 = throw "'mpich2' has been renamed to/replaced by 'mpich'"; # Converted to throw 2022-02-22
|
||||
mps-youtube = throw "'mps-youtube' has been removed as it's unmaintained and stopped working. Use 'yewtube', a maintained fork"; # Added 2022-12-29
|
||||
mqtt-bench = throw "mqtt-bench has been dropped due to the lack of maintenance from upstream since 2017"; # Added 2022-06-02
|
||||
msf = throw "'msf' has been renamed to/replaced by 'metasploit'"; # Converted to throw 2022-02-22
|
||||
multimc = throw "multimc was removed from nixpkgs; use prismlauncher instead (see https://github.com/NixOS/nixpkgs/pull/154051 for more information)"; # Added 2022-01-08
|
||||
|
|
|
@ -31288,8 +31288,6 @@ with pkgs;
|
|||
|
||||
mpc-qt = libsForQt5.callPackage ../applications/video/mpc-qt { };
|
||||
|
||||
mps-youtube = callPackage ../applications/misc/mps-youtube { };
|
||||
|
||||
mplayer = callPackage ../applications/video/mplayer ({
|
||||
libdvdnav = libdvdnav_4_2_1;
|
||||
} // (config.mplayer or {}));
|
||||
|
@ -34098,6 +34096,8 @@ with pkgs;
|
|||
|
||||
yelp-tools = callPackage ../development/misc/yelp-tools { };
|
||||
|
||||
yewtube = callPackage ../applications/misc/yewtube { };
|
||||
|
||||
yokadi = python3Packages.callPackage ../applications/misc/yokadi {};
|
||||
|
||||
yoshimi = callPackage ../applications/audio/yoshimi { };
|
||||
|
|
|
@ -129,6 +129,7 @@ mapAliases ({
|
|||
nose-cover3 = throw "nose-cover3 has been removed, it was using setuptools 2to3 translation feature, which has been removed in setuptools 58"; # added 2022-02-16
|
||||
notifymuch = throw "notifymuch has been promoted to a top-level attribute"; # added 2022-10-02
|
||||
ordereddict = throw "ordereddict has been removed because it is only useful on unsupported python versions."; # added 2022-05-28
|
||||
pafy = throw "pafy has been removed because it is unmaintained and only a dependency of mps-youtube, itself superseded by yewtube"; # Added 2023-01-19
|
||||
pam = python-pam; # added 2020-09-07.
|
||||
PasteDeploy = pastedeploy; # added 2021-10-07
|
||||
pathpy = path; # added 2022-04-12
|
||||
|
|
|
@ -6779,8 +6779,6 @@ self: super: with self; {
|
|||
|
||||
packvers = callPackage ../development/python-modules/packvers { };
|
||||
|
||||
pafy = callPackage ../development/python-modules/pafy { };
|
||||
|
||||
pagelabels = callPackage ../development/python-modules/pagelabels { };
|
||||
|
||||
paho-mqtt = callPackage ../development/python-modules/paho-mqtt { };
|
||||
|
|
Loading…
Reference in a new issue