frei0r: 1.7.0 -> 1.8.0, fix/add cudaSupport (#226666)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
cc8e4ed375
commit
e12fdc26c6
|
@ -1,26 +1,34 @@
|
||||||
{ lib, stdenv, fetchurl, fetchpatch, cairo, cmake, opencv, pcre, pkg-config }:
|
{ lib
|
||||||
|
, config
|
||||||
|
, stdenv
|
||||||
|
, fetchurl
|
||||||
|
, cairo
|
||||||
|
, cmake
|
||||||
|
, opencv
|
||||||
|
, pcre
|
||||||
|
, pkg-config
|
||||||
|
, cudaSupport ? config.cudaSupport or false
|
||||||
|
, cudaPackages
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "frei0r-plugins";
|
pname = "frei0r-plugins";
|
||||||
version = "1.7.0";
|
version = "1.8.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://files.dyne.org/frei0r/releases/${pname}-${version}.tar.gz";
|
url = "https://files.dyne.org/frei0r/releases/${pname}-${version}.tar.gz";
|
||||||
hash = "sha256-Gx/48Pm8I+7XJOlOmnwdjwJEv+M0JLtP5o5kYMCIUjo=";
|
hash = "sha256-RaKGVcrwVyJ7RCuADKOJnpNJBRXIHiEtIZ/fSnYT9cQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# A PR to add support for OpenCV 4 was merged in May 2020. This
|
|
||||||
# patch can be removed when a release beyond 1.7.0 is issued.
|
|
||||||
patches = [
|
|
||||||
(fetchpatch {
|
|
||||||
name = "opencv4-support.patch";
|
|
||||||
url = "https://github.com/dyne/frei0r/commit/c0c8eed79fc8abe6c9881a53d7391efb526a3064.patch";
|
|
||||||
sha256 = "sha256-qxUAui4EEBEj8M/SoyMUkj//KegMTTT6FTBDC/Chxz4=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config ];
|
nativeBuildInputs = [ cmake pkg-config ];
|
||||||
buildInputs = [ cairo opencv pcre ];
|
buildInputs = [
|
||||||
|
cairo
|
||||||
|
opencv
|
||||||
|
pcre
|
||||||
|
] ++ lib.optionals cudaSupport [
|
||||||
|
cudaPackages.cuda_cudart
|
||||||
|
cudaPackages.cuda_nvcc
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||||
for f in $out/lib/frei0r-1/*.so* ; do
|
for f in $out/lib/frei0r-1/*.so* ; do
|
||||||
|
@ -31,9 +39,8 @@ stdenv.mkDerivation rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://frei0r.dyne.org";
|
homepage = "https://frei0r.dyne.org";
|
||||||
description = "Minimalist, cross-platform, shared video plugins";
|
description = "Minimalist, cross-platform, shared video plugins";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = [ maintainers.goibhniu ];
|
maintainers = [ maintainers.goibhniu ];
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue