Unverified Commit c11b8de8 authored by Leona Maroni's avatar Leona Maroni Committed by GitHub
Browse files

vapoursynth-{eedi3,nnedi3cl,nnedi3,znedi3}: init (#332285)

parents 7f36c78e c15cc069
Loading
Loading
Loading
Loading
+56 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  meson,
  ninja,
  pkg-config,
  boost,
  vapoursynth,
  opencl-headers,
  ocl-icd,
  openclSupport ? true,
}:

stdenv.mkDerivation {
  pname = "vapoursynth-eedi3";
  version = "unstable-2019-09-30";

  src = fetchFromGitHub {
    owner = "HomeOfVapourSynthEvolution";
    repo = "VapourSynth-EEDI3";
    rev = "d11bdb37c7a7118cd095b53d9f8fbbac02a06ac0";
    hash = "sha256-MIUf6sOnJ2uqGw3ixEHy1ijzlLFkQauwtm1vfgmYmcg=";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
  ];

  buildInputs =
    [
      boost
      vapoursynth
    ]
    ++ lib.optionals openclSupport [
      ocl-icd
      opencl-headers
    ];

  postPatch = ''
    substituteInPlace meson.build \
      --replace-fail "vapoursynth_dep.get_pkgconfig_variable('libdir')" "get_option('libdir')"
  '';

  mesonFlags = [ (lib.mesonBool "opencl" openclSupport) ];

  meta = {
    description = "Filter for VapourSynth";
    homepage = "https://github.com/HomeOfVapourSynthEvolution/VapourSynth-EEDI3";
    license = with lib.licenses; [ gpl2Plus ];
    maintainers = with lib.maintainers; [ snaki ];
    platforms = lib.platforms.x86_64;
  };
}
+45 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  autoreconfHook,
  pkg-config,
  vapoursynth,
  yasm,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "vapoursynth-nnedi3";
  version = "12";

  src = fetchFromGitHub {
    owner = "dubhater";
    repo = "vapoursynth-nnedi3";
    rev = "refs/tags/v${finalAttrs.version}";
    hash = "sha256-jd/PCXhbCZGMsoXjekbeqMSRVBJAy4INdpkTbZFjVO0=";
  };

  nativeBuildInputs = [
    autoreconfHook
    pkg-config
  ];

  buildInputs = [
    vapoursynth
    yasm
  ];

  configureFlags = [ "--libdir=$(out)/lib/vapoursynth" ];

  postInstall = ''
    rm -f $out/lib/vapoursynth/*.la
  '';

  meta = {
    description = "Filter for VapourSynth";
    homepage = "https://github.com/dubhater/vapoursynth-nnedi3";
    license = with lib.licenses; [ gpl2Plus ];
    maintainers = with lib.maintainers; [ snaki ];
    platforms = with lib.platforms; x86_64 ++ aarch64;
  };
})
+50 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  meson,
  ninja,
  pkg-config,
  boost,
  vapoursynth,
  opencl-headers,
  ocl-icd,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "vapoursynth-nnedi3cl";
  version = "8";

  src = fetchFromGitHub {
    owner = "HomeOfVapourSynthEvolution";
    repo = "VapourSynth-NNEDI3CL";
    rev = "refs/tags/r${finalAttrs.version}";
    hash = "sha256-zW/qEtZTDJOTarXbXhv+nks25eePutLDpLck4TuMKUk=";
  };

  nativeBuildInputs = [
    meson
    ninja
    pkg-config
  ];

  buildInputs = [
    boost
    vapoursynth
    ocl-icd
    opencl-headers
  ];

  postPatch = ''
    substituteInPlace meson.build \
      --replace-fail "vapoursynth_dep.get_pkgconfig_variable('libdir')" "get_option('libdir')"
  '';

  meta = {
    description = "Filter for VapourSynth";
    homepage = "https://github.com/HomeOfVapourSynthEvolution/VapourSynth-NNEDI3CL";
    license = with lib.licenses; [ gpl2Plus ];
    maintainers = with lib.maintainers; [ snaki ];
    platforms = lib.platforms.x86_64;
  };
})
+54 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  vapoursynth,
}:

stdenv.mkDerivation {
  pname = "vapoursynth-znedi3";
  version = "unstable-2023-07-09";

  src = fetchFromGitHub {
    fetchSubmodules = true;
    owner = "sekrit-twc";
    repo = "znedi3";
    rev = "68dc130bc37615fd912d1dc1068261f00f54b146";
    hash = "sha256-QC+hMMfp6XwW4PqsN6sip1Y7ttiYn/xuxq/pUg/trog=";
  };

  buildInputs = [ vapoursynth ];

  postPatch = ''
    rm -rf vsxx/vapoursynth
    ln -s ${vapoursynth}/include/vapoursynth vsxx/vapoursynth
  '';

  makeFlags =
    [ "CPPFLAGS=-DNNEDI3_WEIGHTS_PATH='\"$(out)/share/nnedi3/nnedi3_weights.bin\"'" ]
    ++ lib.optionals stdenv.hostPlatform.isx86 [
      "X86=1"
      "X86_AVX512=1"
    ];

  installPhase = ''
    runHook preInstall

    install -D -t $out/lib/vapoursynth vsznedi3${stdenv.hostPlatform.extensions.sharedLibrary}
    install -D -m644 -t $out/share/nnedi3 nnedi3_weights.bin

    runHook postInstall
  '';

  meta = {
    inherit (vapoursynth.meta) platforms;
    description = "Filter for VapourSynth";
    homepage = "https://github.com/sekrit-twc/znedi3";
    license = with lib.licenses; [
      gpl2Plus
      wtfpl
      lgpl21
    ];
    maintainers = with lib.maintainers; [ snaki ];
  };
}