2019-06-26 01:40:02 +02:00
|
|
|
{ stdenv, fetchFromGitHub, vapoursynth, python }:
|
|
|
|
|
|
|
|
let
|
|
|
|
ext = stdenv.targetPlatform.extensions.sharedLibrary;
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "vapoursynth-descale";
|
|
|
|
version = "r2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Irrational-Encoding-Wizardry";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1vsg6iwbm277hsiawfi6n5h9b7n2n6grl5b287rkb5x2qa88zs0k";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ vapoursynth ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2019-06-26 01:57:16 +02:00
|
|
|
c++ -std=c++11 -shared -fPIC -O2 -I${vapoursynth}/include/vapoursynth \
|
2019-06-26 01:40:02 +02:00
|
|
|
descale.cpp -o libdescale${ext}
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [ "out" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D libdescale${ext} $out/lib/vapoursynth/libdescale${ext}
|
|
|
|
install -D descale.py $out/lib/${python.libPrefix}/site-packages/descale.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "VapourSynth plugin to undo upscaling";
|
|
|
|
homepage = https://github.com/Irrational-Encoding-Wizardry/vapoursynth-descale;
|
|
|
|
license = licenses.wtfpl;
|
|
|
|
maintainers = with maintainers; [ tadeokondrak ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|