vs-mlrt: init at 10

This commit is contained in:
Aidan Gauland 2022-09-16 21:40:24 +12:00 committed by Tadeo Kondrak
parent 182802150a
commit 042be9b782
3 changed files with 71 additions and 0 deletions

View file

@ -65,6 +65,7 @@ in
tnlmeans = prev.callPackage ./plugins/tnlmeans { };
ttempsmooth = prev.callPackage ./plugins/ttempsmooth { };
vivtc = prev.callPackage ./plugins/vivtc { };
vstrt = prev.callPackage ./plugins/vstrt { };
wwxd = prev.callPackage ./plugins/wwxd { };
znedi3 = prev.callPackage ./plugins/znedi3 { };

55
plugins/vstrt/default.nix Normal file
View file

@ -0,0 +1,55 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, vapoursynth
, cudatoolkit
, cudaPackages
}:
stdenv.mkDerivation rec {
pname = "vstrt";
version = "10";
src = fetchFromGitHub {
owner = "AmusementClub";
repo = "vs-mlrt";
rev = "v${version}";
sha256 = "sha256-fnnVaWPvT/eqr1WEwyhX8zi26IK3Ndm7UHLkSLI1nFk=";
};
sourceRoot = "source/vstrt";
patches = [
./no-git-call-in-cmake.patch
];
nativeBuildInputs = [
cmake
];
buildInputs = [
vapoursynth
cudatoolkit
cudaPackages.tensorrt
];
cmakeFlags = [
"-DVCS_TAG=v${version}"
"-DCMAKE_CXX_FLAGS=-I${vapoursynth}/include/vapoursynth"
"-DCMAKE_SKIP_RPATH=ON"
];
postInstall = ''
mkdir $out/lib/vapoursynth
ln -s $out/lib/libvstrt.so $out/lib/vapoursynth
'';
meta = with lib; {
description = "TensorRT-based GPU Runtime";
homepage = "https://github.com/AmusementClub/vs-mlrt";
license = licenses.gpl3;
maintainers = with maintainers; [ aidalgol ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,15 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -61,12 +61,6 @@ target_include_directories(vstrt PUBLIC
"${PROJECT_BINARY_DIR}"
)
-find_package(Git REQUIRED)
-execute_process(
- COMMAND ${GIT_EXECUTABLE} describe --tags --long --always
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
- OUTPUT_VARIABLE VCS_TAG
-)
string(STRIP ${VCS_TAG} VCS_TAG)
configure_file(config.h.in config.h)