about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/frei0r
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/frei0r')
-rw-r--r--nixpkgs/pkgs/development/libraries/frei0r/default.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/frei0r/default.nix b/nixpkgs/pkgs/development/libraries/frei0r/default.nix
new file mode 100644
index 000000000000..dbf5b9c2373e
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/frei0r/default.nix
@@ -0,0 +1,46 @@
+{ lib
+, config
+, stdenv
+, fetchurl
+, cairo
+, cmake
+, opencv
+, pcre
+, pkg-config
+, cudaSupport ? config.cudaSupport or false
+, cudaPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "frei0r-plugins";
+  version = "1.8.0";
+
+  src = fetchurl {
+    url = "https://files.dyne.org/frei0r/releases/${pname}-${version}.tar.gz";
+    hash = "sha256-RaKGVcrwVyJ7RCuADKOJnpNJBRXIHiEtIZ/fSnYT9cQ=";
+  };
+
+  nativeBuildInputs = [ cmake pkg-config ];
+  buildInputs = [
+    cairo
+    opencv
+    pcre
+  ] ++ lib.optionals cudaSupport [
+    cudaPackages.cuda_cudart
+    cudaPackages.cuda_nvcc
+  ];
+
+  postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
+    for f in $out/lib/frei0r-1/*.so* ; do
+      ln -s $f "''${f%.*}.dylib"
+    done
+  '';
+
+  meta = with lib; {
+    homepage = "https://frei0r.dyne.org";
+    description = "Minimalist, cross-platform, shared video plugins";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.goibhniu ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}