diff --git a/default.nix b/default.nix index 8a45986..ae52fcc 100644 --- a/default.nix +++ b/default.nix @@ -14,6 +14,7 @@ in bm3d = super.callPackage ./plugins/bm3d { }; cas = super.callPackage ./plugins/cas { }; cnr2 = super.callPackage ./plugins/cnr2 { }; + combmask = super.callPackage ./plugins/combmask { }; continuityfixer = super.callPackage ./plugins/continuityfixer { }; ctmf = super.callPackage ./plugins/ctmf { }; d2vsource = super.callPackage ./plugins/d2vsource { }; diff --git a/plugins/combmask/default.nix b/plugins/combmask/default.nix new file mode 100644 index 0000000..f953440 --- /dev/null +++ b/plugins/combmask/default.nix @@ -0,0 +1,44 @@ +{ lib, stdenv, fetchFromGitHub, pkg-config, which, vapoursynth }: + +stdenv.mkDerivation rec { + pname = "CombMask"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "chikuzen"; + repo = pname; + rev = version; + sha256 = "04axqp44w7vqrc6lr88j7j1xvj18sbx6fyyqjkqlcvqnn0kg4ksn"; + }; + + postPatch = '' + # headers are provided by nixpkgs’ vapoursynth + rm vapoursynth/src/VapourSynth.h + ''; + + preConfigure = '' + cd vapoursynth/src + ''; + + configurePhase = '' + runHook preConfigure + + bash configure \ + --extra-cflags="$(pkg-config --cflags vapoursynth)" \ + --cc="$CC" \ + --install="$out/lib/vapoursynth" + + runHook postConfigure + ''; + + nativeBuildInputs = [ pkg-config which ]; + buildInputs = [ vapoursynth ]; + + meta = with lib; { + description = "A comb mask create filter for VapourSynth"; + homepage = "https://github.com/chikuzen/CombMask"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.all; + }; +}