about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/frei0r/default.nix
blob: 0215b82a828ccd8882e541ee8a590ed4ad6590c7 (plain) (blame)
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
{ lib
, config
, stdenv
, fetchurl
, cairo
, cmake
, opencv
, pcre
, pkg-config
, cudaSupport ? config.cudaSupport
, 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;
  };
}