mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-06 04:03:04 +00:00
auto-editor: init at 25.3.0
This commit is contained in:
parent
41dea55321
commit
4f2b5f3788
65
pkgs/by-name/au/auto-editor/package.nix
Normal file
65
pkgs/by-name/au/auto-editor/package.nix
Normal file
@ -0,0 +1,65 @@
|
||||
{
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
replaceVars,
|
||||
ffmpeg,
|
||||
yt-dlp,
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "auto-editor";
|
||||
version = "24w29a";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "WyattBlue";
|
||||
repo = "auto-editor";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-2/6IqwMlaWobOlDr/h2WV2OqkxqVmUI65XsyBphTbpA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(replaceVars ./set-exe-paths.patch {
|
||||
ffmpeg = lib.getExe ffmpeg;
|
||||
yt_dlp = lib.getExe yt-dlp;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# pyav is a fork of av, but has since mostly been un-forked
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail '"pyav==12.2.*"' '"av"'
|
||||
'';
|
||||
|
||||
# our patch file also removes the dependency on ae-ffmpeg
|
||||
pythonRemoveDeps = [ "ae-ffmpeg" ];
|
||||
|
||||
build-system = with python3Packages; [
|
||||
setuptools
|
||||
];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
av
|
||||
numpy
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
$out/bin/auto-editor test all
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "auto_editor" ];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/WyattBlue/auto-editor/releases/tag/${version}";
|
||||
description = "Command line application for automatically editing video and audio by analyzing a variety of methods, most notably audio loudness";
|
||||
homepage = "https://auto-editor.com/";
|
||||
license = lib.licenses.unlicense;
|
||||
mainProgram = "auto-editor";
|
||||
maintainers = with lib.maintainers; [ tomasajt ];
|
||||
};
|
||||
}
|
32
pkgs/by-name/au/auto-editor/set-exe-paths.patch
Normal file
32
pkgs/by-name/au/auto-editor/set-exe-paths.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/auto_editor/ffwrapper.py b/auto_editor/ffwrapper.py
|
||||
index b6df2d4..8409032 100644
|
||||
--- a/auto_editor/ffwrapper.py
|
||||
+++ b/auto_editor/ffwrapper.py
|
||||
@@ -30,13 +30,7 @@ class FFmpeg:
|
||||
return ff_location
|
||||
if my_ffmpeg:
|
||||
return "ffmpeg"
|
||||
-
|
||||
- try:
|
||||
- import ae_ffmpeg
|
||||
-
|
||||
- return ae_ffmpeg.get_path()
|
||||
- except ImportError:
|
||||
- return "ffmpeg"
|
||||
+ return "@ffmpeg@"
|
||||
|
||||
self.debug = debug
|
||||
self.show_cmd = show_cmd
|
||||
diff --git a/auto_editor/utils/types.py b/auto_editor/utils/types.py
|
||||
index ccd6581..a66e5e3 100644
|
||||
--- a/auto_editor/utils/types.py
|
||||
+++ b/auto_editor/utils/types.py
|
||||
@@ -218,7 +218,7 @@ def resolution(val: str | None) -> tuple[int, int] | None:
|
||||
|
||||
@dataclass
|
||||
class Args:
|
||||
- yt_dlp_location: str = "yt-dlp"
|
||||
+ yt_dlp_location: str = "@yt_dlp@"
|
||||
download_format: str | None = None
|
||||
output_format: str | None = None
|
||||
yt_dlp_extras: str | None = None
|
Loading…
Reference in New Issue
Block a user