2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
2022-06-16 17:23:12 +00:00
|
|
|
, substituteAll
|
|
|
|
, ffmpeg
|
|
|
|
, installShellFiles
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
python3.pkgs.buildPythonApplication rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "you-get";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "0.4.1650";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Tests aren't packaged, but they all hit the real network so
|
|
|
|
# probably aren't suitable for a build environment anyway.
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchPypi {
|
2020-04-24 23:36:52 +00:00
|
|
|
inherit pname version;
|
2023-03-04 12:14:45 +00:00
|
|
|
sha256 = "sha256-s8lEz3pjzEaMzMiBbc5/wAjC5rW6Uq7+XOIIGBijrUc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./ffmpeg-path.patch;
|
|
|
|
ffmpeg = "${lib.getBin ffmpeg}/bin/ffmpeg";
|
|
|
|
ffprobe = "${lib.getBin ffmpeg}/bin/ffmpeg";
|
|
|
|
version = lib.getVersion ffmpeg;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd you-get \
|
|
|
|
--zsh contrib/completion/_you-get \
|
|
|
|
--fish contrib/completion/you-get.fish \
|
|
|
|
--bash contrib/completion/you-get-completion.bash
|
|
|
|
'';
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"you_get"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tiny command line utility to download media contents from the web";
|
|
|
|
homepage = "https://you-get.org";
|
2022-08-12 12:06:08 +00:00
|
|
|
changelog = "https://github.com/soimort/you-get/raw/v${version}/CHANGELOG.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ryneeverett ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "you-get";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|