From f8d6e28f7d0ea2660ff19f9e9d39514a77346a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 27 Mar 2021 12:26:35 +0100 Subject: [PATCH 1/3] python3Packages.pytube: init at 10.6.1 --- .../python-modules/pytube/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/pytube/default.nix diff --git a/pkgs/development/python-modules/pytube/default.nix b/pkgs/development/python-modules/pytube/default.nix new file mode 100644 index 000000000000..f47e6af16c0a --- /dev/null +++ b/pkgs/development/python-modules/pytube/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, typing-extensions +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pytube"; + version = "10.6.1"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "pytube"; + repo = "pytube"; + rev = "v${version}"; + sha256 = "sha256-b0tN4m3/+K243zQ7L4wW4crk9r69Tj64is6C4I5oFZU="; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "pytube" ]; + + meta = with lib; { + description = "Python 3 library for downloading YouTube Videos"; + homepage = "https://github.com/nficano/pytube"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2875eca59b3a..6e4ad2a6a7da 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6889,6 +6889,8 @@ in { pytricia = callPackage ../development/python-modules/pytricia { }; + pytube = callPackage ../development/python-modules/pytube { }; + pytun = callPackage ../development/python-modules/pytun { }; pytz = callPackage ../development/python-modules/pytz { }; From 57497a9a41d778f636c58cf42ccfad7bb886bfee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 27 Mar 2021 12:47:16 +0100 Subject: [PATCH 2/3] python3Packages.rapidfuzz: init at 1.3.3 --- .../python-modules/rapidfuzz/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/rapidfuzz/default.nix diff --git a/pkgs/development/python-modules/rapidfuzz/default.nix b/pkgs/development/python-modules/rapidfuzz/default.nix new file mode 100644 index 000000000000..225f743904d5 --- /dev/null +++ b/pkgs/development/python-modules/rapidfuzz/default.nix @@ -0,0 +1,47 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, pytestCheckHook +, hypothesis +, pandas +}: + +buildPythonPackage rec { + pname = "rapidfuzz"; + version = "1.3.3"; + + disabled = pythonOlder "3.5"; + + src = fetchFromGitHub { + owner = "maxbachmann"; + repo = "RapidFuzz"; + rev = "v${version}"; + fetchSubmodules = true; + sha256 = "1k28mycf945zp5kkdm4anjqac8ysmp0pabyjg96xww8hnlwmqcnf"; + }; + + checkInputs = [ + pytestCheckHook + hypothesis + pandas + ]; + + disabledTests = [ + "test_levenshtein_block" # hypothesis data generation too slow + ]; + + pythonImportsCheck = [ + "rapidfuzz.fuzz" + "rapidfuzz.string_metric" + "rapidfuzz.process" + "rapidfuzz.utils" + ]; + + meta = with lib; { + description = "Rapid fuzzy string matching"; + homepage = "https://github.com/maxbachmann/rapidfuzz"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6e4ad2a6a7da..f5419f536ad1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7100,6 +7100,8 @@ in { random2 = callPackage ../development/python-modules/random2 { }; + rapidfuzz = callPackage ../development/python-modules/rapidfuzz { }; + rarfile = callPackage ../development/python-modules/rarfile { inherit (pkgs) libarchive; }; From 59c1caf6d5dab7a5979976a43f56ce9c74124503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 27 Mar 2021 13:30:21 +0100 Subject: [PATCH 3/3] spotdl: init at 3.5.0 --- pkgs/tools/audio/spotdl/default.nix | 47 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 49 insertions(+) create mode 100644 pkgs/tools/audio/spotdl/default.nix diff --git a/pkgs/tools/audio/spotdl/default.nix b/pkgs/tools/audio/spotdl/default.nix new file mode 100644 index 000000000000..520af8404aeb --- /dev/null +++ b/pkgs/tools/audio/spotdl/default.nix @@ -0,0 +1,47 @@ +{ lib +, python3 +, fetchFromGitHub +, ffmpeg +}: + +python3.pkgs.buildPythonApplication rec { + pname = "spotdl"; + version = "3.5.0"; + + src = fetchFromGitHub { + owner = "spotDL"; + repo = "spotify-downloader"; + rev = "v${version}"; + sha256 = "1nxf911hi578jw24hlcvyy33z1pkvr41pfrywbs3157rj1fj2vfi"; + }; + + propagatedBuildInputs = with python3.pkgs; [ + spotipy + pytube + rich + rapidfuzz + mutagen + ytmusicapi + tqdm + beautifulsoup4 + requests + ]; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + pytest-mock + pytest-vcr + pyfakefs + ]; + + makeWrapperArgs = [ + "--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ]) + ]; + + meta = with lib; { + description = "Download your Spotify playlists and songs along with album art and metadata"; + homepage = "https://github.com/spotDL/spotify-downloader"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eb4adf5b0858..9f33d609b239 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8269,6 +8269,8 @@ in splot = haskell.lib.justStaticExecutables haskellPackages.splot; + spotdl = callPackage ../tools/audio/spotdl { }; + squashfsTools = callPackage ../tools/filesystems/squashfs { }; squashfs-tools-ng = callPackage ../tools/filesystems/squashfs-tools-ng { };