From cd3dc48577429f733b4b86fd50fd92706ef16bde Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 23 Jan 2021 10:22:08 +0100 Subject: [PATCH] vapoursynthPlugins.nnedi3cl: init at r8 --- default.nix | 1 + plugins/nnedi3cl/default.nix | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 plugins/nnedi3cl/default.nix diff --git a/default.nix b/default.nix index 98e7813..59be610 100644 --- a/default.nix +++ b/default.nix @@ -21,6 +21,7 @@ self: super: { median = super.callPackage ./plugins/median { }; mvtools = super.vapoursynth-mvtools; nnedi3 = super.callPackage ./plugins/nnedi3 { }; + nnedi3cl = super.callPackage ./plugins/nnedi3cl { }; retinex = super.callPackage ./plugins/retinex { }; sangnom = super.callPackage ./plugins/sangnom { }; tcanny = super.callPackage ./plugins/tcanny { }; diff --git a/plugins/nnedi3cl/default.nix b/plugins/nnedi3cl/default.nix new file mode 100644 index 0000000..a87bb3a --- /dev/null +++ b/plugins/nnedi3cl/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config, boost, ocl-icd, opencl-headers, vapoursynth }: + +stdenv.mkDerivation rec { + pname = "VapourSynth-NNEDI3CL"; + version = "r8"; + + src = fetchFromGitHub { + owner = "HomeOfVapourSynthEvolution"; + repo = pname; + rev = version; + sha256 = "0j99ihxy295plk1x5flgwzjkcjwyzqdmxnxmda9r632ksq9flvyd"; + }; + + nativeBuildInputs = [ meson ninja pkg-config ]; + buildInputs = [ boost ocl-icd opencl-headers vapoursynth ]; + + # https://github.com/NixOS/nixpkgs/issues/86131 + BOOST_INCLUDEDIR = "${lib.getDev boost}/include"; + BOOST_LIBRARYDIR = "${lib.getLib boost}/lib"; + + postPatch = '' + substituteInPlace meson.build \ + --replace "vapoursynth_dep.get_pkgconfig_variable('libdir')" "get_option('libdir')" + ''; + + meta = with lib; { + description = "An OpenCL accelerated nnedi3 filter for VapourSynth"; + homepage = "https://github.com/HomeOfVapourSynthEvolution/VapourSynth-NNEDI3CL"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}