diff options
author | Simon Bruder <simon@sbruder.de> | 2020-10-17 20:05:13 +0200 |
---|---|---|
committer | Simon Bruder <simon@sbruder.de> | 2020-10-17 20:34:21 +0200 |
commit | ca3dd4b52f6ffdb9310a9fca2be8a41e413ba857 (patch) | |
tree | 46852990fcd13366291137f782cc0fa7ae2a81d7 /pkgs/tools/graphics/waifu2x-converter-cpp | |
parent | c69dd49995325723280851dd70eda359cbc9d8ce (diff) |
waifu2x-converter-cpp: add OpenCL support
Diffstat (limited to 'pkgs/tools/graphics/waifu2x-converter-cpp')
-rw-r--r-- | pkgs/tools/graphics/waifu2x-converter-cpp/default.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix b/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix index 79fdd9c77778..fa2088ca297b 100644 --- a/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix +++ b/pkgs/tools/graphics/waifu2x-converter-cpp/default.nix @@ -1,4 +1,4 @@ -{ cmake, fetchFromGitHub, opencv3, stdenv, ocl-icd, opencl-headers +{ cmake, fetchFromGitHub, makeWrapper, opencv3, stdenv, ocl-icd, opencl-headers , cudaSupport ? false, cudatoolkit ? null }: @@ -19,10 +19,14 @@ stdenv.mkDerivation rec { ''; buildInputs = [ - opencv3 opencl-headers ocl-icd + ocl-icd opencv3 opencl-headers ] ++ stdenv.lib.optional cudaSupport cudatoolkit; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake makeWrapper ]; + + preFixup = '' + wrapProgram $out/bin/waifu2x-converter-cpp --prefix LD_LIBRARY_PATH : "${ocl-icd}/lib" + ''; meta = { description = "Improved fork of Waifu2X C++ using OpenCL and OpenCV"; |