From 1031932821dc4a19c1e0ffdb31f931aa52475128 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 23 Jan 2021 10:26:07 +0100 Subject: [PATCH] vapoursynthPlugins.placebo: init at 1.3.1 --- default.nix | 1 + plugins/placebo/default.nix | 42 +++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 plugins/placebo/default.nix diff --git a/default.nix b/default.nix index 59be610..853f610 100644 --- a/default.nix +++ b/default.nix @@ -22,6 +22,7 @@ self: super: { mvtools = super.vapoursynth-mvtools; nnedi3 = super.callPackage ./plugins/nnedi3 { }; nnedi3cl = super.callPackage ./plugins/nnedi3cl { }; + placebo = super.callPackage ./plugins/placebo { }; retinex = super.callPackage ./plugins/retinex { }; sangnom = super.callPackage ./plugins/sangnom { }; tcanny = super.callPackage ./plugins/tcanny { }; diff --git a/plugins/placebo/default.nix b/plugins/placebo/default.nix new file mode 100644 index 0000000..116db0d --- /dev/null +++ b/plugins/placebo/default.nix @@ -0,0 +1,42 @@ +{ lib, stdenv, fetchFromGitHub, fetchpatch, meson, ninja, pkg-config, libplacebo, vapoursynth, vulkan-headers, vulkan-loader }: + +stdenv.mkDerivation rec { + pname = "vs-placebo"; + version = "1.3.1"; + + src = fetchFromGitHub { + owner = "Lypheo"; + repo = pname; + rev = version; + sha256 = "079i4ixm6273gy9x80ij7s645v5bm53vczkky5lg4vls5sk00hk2"; + fetchSubmodules = true; + }; + + patches = [ + # fix build with newer libplacebo + (fetchpatch { + url = "https://github.com/Lypheo/vs-placebo/commit/d717bb49ce03ea9d67152a7c2e4df026de040c35.diff"; + sha256 = "0phnhpv7alxyw4ki3kj3a19j8qv16hww6gz06lyiyabj20xqibri"; + }) + (fetchpatch { + url = "https://github.com/Lypheo/vs-placebo/commit/6a99aa1c427f9119d695d3e9d1a08782f51740d1.diff"; + sha256 = "1x7by89vc0368p4baqlyqi5kw38plr024g4kxbr6afg4f8q4rl58"; + }) + ]; + + nativeBuildInputs = [ meson ninja pkg-config ]; + buildInputs = [ libplacebo vapoursynth vulkan-headers vulkan-loader ]; + + postPatch = '' + substituteInPlace meson.build \ + --replace "vapoursynth_dep.get_pkgconfig_variable('libdir')" "get_option('libdir')" + ''; + + meta = with lib; { + description = "A libplacebo-based debanding, scaling and color mapping plugin for VapourSynth"; + homepage = "https://github.com/Lypheo/vs-placebo"; + license = licenses.lgpl21Only; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}