Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions pkgs/by-name/ga/gamdl/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:

python3Packages.buildPythonApplication {
pname = "gamdl";
version = "2.8";
pyproject = true;

src = fetchFromGitHub {
owner = "glomatico";
repo = "gamdl";
rev = "37c857b503ca9ea32c4b39669bbb2d23064f39ff";
hash = "sha256-uwl/K0KbZKwJ8mxiQOP+nGB3I69X5wv3HhfxBiiv/VM=";
};

pythonRelaxDeps = [
"click"
"pillow"
"yt-dlp"
];

build-system = with python3Packages; [ setuptools ];

dependencies = with python3Packages; [
async-lru
click
httpx
inquirerpy
m3u8
mutagen
pillow
pywidevine
yt-dlp
];

doCheck = false; # no tests

meta = {
description = "Command-line app for downloading Apple Music songs, music videos and post videos";
homepage = "https://github.com/glomatico/gamdl";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bdim404 ];
platforms = lib.platforms.all;
};
}
38 changes: 38 additions & 0 deletions pkgs/development/python-modules/pymp4/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
construct,
pytestCheckHook,
}:

buildPythonPackage {
pname = "pymp4";
version = "1.4.0-unstable-2023-08-07";
pyproject = true;

src = fetchFromGitHub {
owner = "devine-dl";
repo = "pymp4";
rev = "33dc5d620f361cb49d713b60dcb2686ab8696f91";
hash = "sha256-tPIbehjYHg5+S62sorsWow+u/eBkqJYf6xMI8q4vEgY=";
};

pythonRelaxDeps = [ "construct" ];

build-system = [ poetry-core ];

dependencies = [ construct ];

nativeCheckInputs = [ pytestCheckHook ];

doCheck = false;

meta = {
description = "Python library for parsing and manipulating MP4 files";
homepage = "https://github.com/beardypig/pymp4";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ bdim404 ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- a/pywidevine/device.py
+++ b/pywidevine/device.py
@@ -33,7 +33,7 @@ class _Structures:
# - Removed vmp and vmp_len as it should already be within the Client ID
v2 = Struct(
"signature" / magic,
- "version" / Const(Int8ub, 2),
+ "version" / Const(2, Int8ub),
"type_" / CEnum(
Int8ub,
**{t.name: t.value for t in DeviceTypes}
@@ -50,7 +50,7 @@ class _Structures:
# - Removed system_id as it can be retrieved from the Client ID's DRM Certificate
v1 = Struct(
"signature" / magic,
- "version" / Const(Int8ub, 1),
+ "version" / Const(1, Int8ub),
"type_" / CEnum(
Int8ub,
**{t.name: t.value for t in DeviceTypes}
54 changes: 54 additions & 0 deletions pkgs/development/python-modules/pywidevine/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
lib,
buildPythonPackage,
fetchPypi,
poetry-core,
pycryptodome,
protobuf,
requests,
pyyaml,
unidecode,
click,
pymp4,
construct,
}:

buildPythonPackage {
pname = "pywidevine";
version = "1.8.0";
pyproject = true;

src = fetchPypi {
pname = "pywidevine";
version = "1.8.0";
hash = "sha256-wU8/4oZEc0FrnKpz2aISUaAtchOObVTYwaP0S3prBck=";
};

patches = [
./construct-2.10-compatibility.patch
];

pythonRelaxDeps = [ "protobuf" ];

build-system = [ poetry-core ];

dependencies = [
click
construct
protobuf
pycryptodome
pymp4
pyyaml
requests
unidecode
];

doCheck = false;

meta = {
description = "Python implementation of Google's Widevine CDM";
homepage = "https://github.com/devine-project/pywidevine";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ bdim404 ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13328,6 +13328,8 @@ self: super: with self; {

pymorphy3-dicts-uk = callPackage ../development/python-modules/pymorphy3/dicts-uk.nix { };

pymp4 = callPackage ../development/python-modules/pymp4 { };

pympler = callPackage ../development/python-modules/pympler { };

pymsgbox = callPackage ../development/python-modules/pymsgbox { };
Expand Down Expand Up @@ -15164,6 +15166,8 @@ self: super: with self; {

pywfa = callPackage ../development/python-modules/pywfa { };

pywidevine = callPackage ../development/python-modules/pywidevine { };

pywikibot = callPackage ../development/python-modules/pywikibot { };

pywilight = callPackage ../development/python-modules/pywilight { };
Expand Down
Loading