nixpkgs/pkgs/tools/misc/you-get/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.3 KiB
Nix
Raw Normal View History

2022-06-01 03:05:35 +02:00
{ lib
, python3
, fetchPypi
2022-06-01 03:05:35 +02:00
, substituteAll
, ffmpeg
, installShellFiles
}:
2018-01-26 04:05:32 +01:00
2022-06-01 03:05:35 +02:00
python3.pkgs.buildPythonApplication rec {
2018-01-26 04:05:32 +01:00
pname = "you-get";
version = "0.4.1650";
format = "setuptools";
2018-01-26 04:05:32 +01:00
# Tests aren't packaged, but they all hit the real network so
# probably aren't suitable for a build environment anyway.
doCheck = false;
src = fetchPypi {
2018-01-26 04:05:32 +01:00
inherit pname version;
sha256 = "sha256-s8lEz3pjzEaMzMiBbc5/wAjC5rW6Uq7+XOIIGBijrUc=";
2018-01-26 04:05:32 +01:00
};
2022-06-01 03:05:35 +02:00
patches = [
(substituteAll {
src = ./ffmpeg-path.patch;
ffmpeg = "${lib.getBin ffmpeg}/bin/ffmpeg";
ffprobe = "${lib.getBin ffmpeg}/bin/ffmpeg";
version = lib.getVersion ffmpeg;
})
];
2021-11-15 16:30:00 +01: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
'';
pythonImportsCheck = [
"you_get"
];
meta = with lib; {
2018-01-26 04:05:32 +01:00
description = "A tiny command line utility to download media contents from the web";
2020-03-10 03:57:43 +01:00
homepage = "https://you-get.org";
2022-07-19 06:20:00 +02:00
changelog = "https://github.com/soimort/you-get/raw/v${version}/CHANGELOG.rst";
2018-01-26 04:05:32 +01:00
license = licenses.mit;
maintainers = with maintainers; [ ryneeverett ];
2023-11-27 02:17:53 +01:00
mainProgram = "you-get";
2018-01-26 04:05:32 +01:00
};
}