lol

grive2: pull gcc-12 upstream fix

Without the change build fails on `master` as:

[ 14%] Building CXX object libgrive/CMakeFiles/grive.dir/src/base/Syncer.cc.o
In file included from /build/source/libgrive/src/base/Syncer.cc:20:
/build/source/libgrive/src/base/Syncer.hh:58:22: error: 'unique_ptr' in namespace 'std' does not name a template type
58 | virtual std::unique_ptr<Feed> GetFolders() = 0;
| ^~~~~~~~~~

Full build log: https://hydra.nixos.org/log/48jk4w7l1frlf6x8xjli2vyqqxk24ib1-grive2-0.5.3.drv

+23 -2
+23 -2
pkgs/tools/filesystems/grive2/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, pkg-config, yajl, cmake, libgcrypt, curl, expat, boost, libiberty }: 2 3 stdenv.mkDerivation rec { 4 version = "0.5.3"; ··· 11 sha256 = "sha256-P6gitA5cXfNbNDy4ohRLyXj/5dUXkCkOdE/9rJPzNCg="; 12 }; 13 14 nativeBuildInputs = [ cmake pkg-config ]; 15 16 buildInputs = [ libgcrypt yajl curl expat boost libiberty ]; ··· 21 license = licenses.gpl2; 22 platforms = platforms.linux; 23 }; 24 - 25 }
··· 1 + { lib 2 + , stdenv 3 + , fetchFromGitHub 4 + , fetchpatch 5 + , pkg-config 6 + , yajl 7 + , cmake 8 + , libgcrypt 9 + , curl 10 + , expat 11 + , boost 12 + , libiberty 13 + }: 14 15 stdenv.mkDerivation rec { 16 version = "0.5.3"; ··· 23 sha256 = "sha256-P6gitA5cXfNbNDy4ohRLyXj/5dUXkCkOdE/9rJPzNCg="; 24 }; 25 26 + patches = [ 27 + # Backport gcc-12 support: 28 + # https://github.com/vitalif/grive2/pull/363 29 + (fetchpatch { 30 + name = "gcc-12.patch"; 31 + url = "https://github.com/vitalif/grive2/commit/3cf1c058a3e61deb370dde36024a106a213ab2c6.patch"; 32 + hash = "sha256-v2Pb6Qvgml/fYzh/VCjOvEVnFYMkOHqROvLLe61DmKA="; 33 + }) 34 + ]; 35 + 36 nativeBuildInputs = [ cmake pkg-config ]; 37 38 buildInputs = [ libgcrypt yajl curl expat boost libiberty ]; ··· 43 license = licenses.gpl2; 44 platforms = platforms.linux; 45 }; 46 }