-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathknlmeanscl.nix
47 lines (39 loc) · 1.2 KB
/
knlmeanscl.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{ lib, stdenv, fetchFromGitHub, meson, ninja, pkg-config
, intel-ocl, ocl-icd, opencl-headers
, boost, vapoursynth
}:
stdenv.mkDerivation rec {
pname = "knlmeanscl";
version = "master";
src = fetchFromGitHub {
owner = "Khanattila";
repo = "KNLMeansCL";
rev = version;
sha256 = "1qx82nk4fxalwxy9i617f97arhs7i7labvm9dnnp5gn1qdm0pps3";
};
# Meson is no longer able to pick up Boost automatically.
# https://github.com/NixOS/nixpkgs/issues/86131
BOOST_INCLUDEDIR = "${lib.getDev boost}/include";
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib";
# This is obviously not currently portable.
nativeBuildInputs = [ intel-ocl ocl-icd meson ninja pkg-config ];
buildInputs = [
boost
boost.dev
opencl-headers
vapoursynth
];
patches = [
./patches/fix-export-knlmeanscl.patch
];
postInstall = ''
mkdir -p $out/lib/vapoursynth
ln -s $out/lib/libknlmeanscl.so $out/lib/vapoursynth/libknlmeanscl.so
'';
meta = with lib; {
description = "An optimized OpenCL implementation of the Non-local means de-noising algorithm";
homepage = "https://github.com/Khanattila/KNLMeansCL";
license = licenses.gpl3;
platforms = platforms.x86_64;
};
}