Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
93 lines
1.5 KiB
Nix
93 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
nix-update-script,
|
|
python3Packages,
|
|
perl,
|
|
ffmpeg,
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (python3Packages)
|
|
buildPythonApplication
|
|
setuptools
|
|
requests
|
|
pysocks
|
|
cryptography
|
|
pyyaml
|
|
pytestCheckHook
|
|
mock
|
|
requests-mock
|
|
;
|
|
|
|
version = "4.137";
|
|
|
|
in
|
|
|
|
buildPythonApplication {
|
|
pname = "svtplay-dl";
|
|
inherit version;
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "spaam";
|
|
repo = "svtplay-dl";
|
|
rev = version;
|
|
hash = "sha256-KBX2YfDyEu9nwlaZlOw+4FKy+hhLncVr8xhXn7XhvAU=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
requests
|
|
pysocks
|
|
cryptography
|
|
pyyaml
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
# For `pod2man(1)`.
|
|
perl
|
|
installShellFiles
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
mock
|
|
requests-mock
|
|
];
|
|
|
|
pytestFlags = [
|
|
"--doctest-modules"
|
|
];
|
|
|
|
enabledTestPaths = [
|
|
"lib"
|
|
];
|
|
|
|
postBuild = ''
|
|
make svtplay-dl.1
|
|
'';
|
|
|
|
postInstall = ''
|
|
installManPage svtplay-dl.1
|
|
makeWrapperArgs+=(--prefix PATH : "${lib.makeBinPath [ ffmpeg ]}")
|
|
'';
|
|
|
|
postInstallCheck = ''
|
|
$out/bin/svtplay-dl --help > /dev/null
|
|
'';
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
homepage = "https://github.com/spaam/svtplay-dl";
|
|
description = "Command-line tool to download videos from svtplay.se and other sites";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.unix;
|
|
mainProgram = "svtplay-dl";
|
|
};
|
|
}
|