mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-21 20:34:06 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
87 lines
1.4 KiB
Nix
87 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
python3Packages,
|
|
perl,
|
|
ffmpeg,
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (python3Packages)
|
|
buildPythonApplication
|
|
setuptools
|
|
requests
|
|
pysocks
|
|
cryptography
|
|
pyyaml
|
|
pytestCheckHook
|
|
mock
|
|
requests-mock
|
|
;
|
|
|
|
version = "4.101";
|
|
|
|
in
|
|
|
|
buildPythonApplication {
|
|
pname = "svtplay-dl";
|
|
inherit version;
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "spaam";
|
|
repo = "svtplay-dl";
|
|
rev = version;
|
|
hash = "sha256-bHUrpkGBguI8oZB1h1ToFkFsGiMeyV7TyDtgJ8+2TzI=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
requests
|
|
pysocks
|
|
cryptography
|
|
pyyaml
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
# For `pod2man(1)`.
|
|
perl
|
|
installShellFiles
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
mock
|
|
requests-mock
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"--doctest-modules"
|
|
"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
|
|
'';
|
|
|
|
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";
|
|
};
|
|
}
|