2022-05-26 22:22:43 +02:00
|
|
|
|
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, vapoursynth, python }:
|
2019-06-26 01:40:02 +02:00
|
|
|
|
|
2022-05-26 22:22:43 +02:00
|
|
|
|
# required to make python.buildEnv use descale’s python module
|
|
|
|
|
python.pkgs.toPythonModule (stdenv.mkDerivation rec {
|
2019-06-26 01:40:02 +02:00
|
|
|
|
pname = "vapoursynth-descale";
|
2021-01-22 15:41:40 +01:00
|
|
|
|
version = "r6";
|
2019-06-26 01:40:02 +02:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "Irrational-Encoding-Wizardry";
|
|
|
|
|
repo = pname;
|
|
|
|
|
rev = version;
|
2021-01-22 15:41:40 +01:00
|
|
|
|
sha256 = "093dk125y4gacvhrh10x1i5g2qbsjl4spz74gjjm7xbvrvi1sc72";
|
2019-06-26 01:40:02 +02:00
|
|
|
|
};
|
|
|
|
|
|
2021-01-22 15:41:40 +01:00
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config ];
|
2019-06-26 01:40:02 +02:00
|
|
|
|
buildInputs = [ vapoursynth ];
|
|
|
|
|
|
2021-01-22 15:41:40 +01:00
|
|
|
|
postPatch = ''
|
|
|
|
|
substituteInPlace meson.build \
|
|
|
|
|
--replace "vs.get_pkgconfig_variable('libdir')" "get_option('libdir')"
|
2019-06-26 01:40:02 +02:00
|
|
|
|
'';
|
|
|
|
|
|
2021-01-22 15:41:40 +01:00
|
|
|
|
postInstall = ''
|
2022-05-26 22:22:43 +02:00
|
|
|
|
install -D ../descale.py $out/${python.sitePackages}/descale.py
|
2019-06-26 01:40:02 +02:00
|
|
|
|
'';
|
|
|
|
|
|
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;
|
2021-01-22 15:51:44 +01:00
|
|
|
|
maintainers = with maintainers; [ sbruder tadeokondrak ];
|
2019-06-26 01:40:02 +02:00
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
};
|
2021-01-22 15:41:40 +01:00
|
|
|
|
})
|