vs-overlay/plugins/awsmfunc/default.nix
2023-10-28 21:57:45 +13:00

47 lines
1.2 KiB
Nix

{ lib, vapoursynthPlugins, buildPythonPackage, fetchFromGitHub, numpy, vapoursynth }:
let
propagatedBinaryPlugins = with vapoursynthPlugins; [
descale
fillborders
placebo
remap
];
in
buildPythonPackage rec {
pname = "awsmfunc";
version = "1.3.4";
src = fetchFromGitHub {
owner = "OpusGang";
repo = pname;
rev = "v${version}";
hash = lib.fakeHash;
};
# This does not depend on vapoursynth (since this is used from within
# vapoursynth).
postPatch = ''
substituteInPlace requirements.txt \
--replace "VapourSynth>=49" "" \
--replace "rekt@https://gitlab.com/Ututu/rekt/-/archive/3da2b2f2b2d670e635cef6dcc61f19c8fe10f1fa/rekt-3da2b2f2b2d670e635cef6dcc61f19c8fe10f1fa.zip" "rekt"
'';
propagatedBuildInputs = [
numpy
] ++ (with vapoursynthPlugins; [
rekt
vsutil
]);
checkInputs = [ (vapoursynth.withPlugins propagatedBinaryPlugins) ];
pythonImportsCheck = [ "awsmfunc" ];
meta = with lib; {
description = "A VapourSynth function collection";
homepage = "https://github.com/OpusGang/awsmfunc";
license = licenses.mit;
maintainers = with maintainers; [ sbruder ];
platforms = platforms.all;
};
}