diff --git a/pkgs/development/libraries/ffmpeg/generic.nix b/pkgs/development/libraries/ffmpeg/generic.nix index 30f2240d2ca4..8afe94da8ad6 100644 --- a/pkgs/development/libraries/ffmpeg/generic.nix +++ b/pkgs/development/libraries/ffmpeg/generic.nix @@ -436,6 +436,9 @@ stdenv.mkDerivation ( hash = "sha256-l1t4LcUDSW757diNu69NzvjenW5Mxb5aYtXz64Yl9gs="; }) ] + ++ optionals (lib.versionAtLeast version "5.1") [ + ./nvccflags-cpp14.patch + ] ++ optionals (lib.versionAtLeast version "6.1" && lib.versionOlder version "6.2") [ (fetchpatch2 { # this can be removed post 6.1 diff --git a/pkgs/development/libraries/ffmpeg/nvccflags-cpp14.patch b/pkgs/development/libraries/ffmpeg/nvccflags-cpp14.patch new file mode 100644 index 000000000000..4c395ad13229 --- /dev/null +++ b/pkgs/development/libraries/ffmpeg/nvccflags-cpp14.patch @@ -0,0 +1,13 @@ +diff --git a/configure b/configure +index ffa407d53d..f3e223cfac 100755 +--- a/configure ++++ b/configure +@@ -6742,7 +6742,7 @@ if [ -z "$nvccflags" ]; then + nvccflags=$nvccflags_default + fi + +-nvccflags="$nvccflags -std=c++11" ++nvccflags="$nvccflags -std=c++14" + + if enabled x86_64 || enabled ppc64 || enabled aarch64; then + nvccflags="$nvccflags -m64"