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
|
|
|
|
'';
|
|
|
|
|
2021-01-22 17:10:08 +01:00
|
|
|
meta = with lib; {
|
2019-06-26 01:40:02 +02:00
|
|
|
description = "VapourSynth plugin to undo upscaling";
|
2021-01-22 17:22:37 +01:00
|
|
|
homepage = "https://github.com/Irrational-Encoding-Wizardry/vapoursynth-descale";
|
2019-06-26 01:40:02 +02:00
|
|
|
license = licenses.wtfpl;
|
|
|
|
maintainers = with maintainers; [ tadeokondrak ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|