Merge pull request #182917 from smancill/flatbuffers-2.0.6

flatbuffers: 2.0.0 -> 2.0.6

authored by Sergei Trofimovich and committed by GitHub 14dcb5a3 94cfcf79

+9 -12
+9 -12
pkgs/development/libraries/flatbuffers/default.nix
··· 3 , fetchFromGitHub 4 , fetchpatch 5 , cmake 6 }: 7 8 stdenv.mkDerivation rec { 9 pname = "flatbuffers"; 10 - version = "2.0.0"; 11 12 src = fetchFromGitHub { 13 owner = "google"; 14 repo = "flatbuffers"; 15 rev = "v${version}"; 16 - sha256 = "1zbf6bdpps8369r1ql00irxrp58jnalycc8jcapb8iqg654vlfz8"; 17 }; 18 19 - patches = [ 20 - # Pull patch pending upstream inclustion for gcc-12 support: 21 - # https://github.com/google/flatbuffers/pull/6946 22 - (fetchpatch { 23 - name = "gcc-12.patch"; 24 - url = "https://github.com/google/flatbuffers/commit/17d9f0c4cf47a9575b4f43a2ac33eb35ba7f9e3e.patch"; 25 - sha256 = "0sksk47hi7camja9ppnjr88jfdgj0nxqxy8976qs1nx73zkgbpf9"; 26 - }) 27 - ]; 28 29 - nativeBuildInputs = [ cmake ]; 30 31 cmakeFlags = [ 32 "-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" 33 ]; 34 35 doCheck = stdenv.hostPlatform == stdenv.buildPlatform;
··· 3 , fetchFromGitHub 4 , fetchpatch 5 , cmake 6 + , python3 7 }: 8 9 stdenv.mkDerivation rec { 10 pname = "flatbuffers"; 11 + version = "2.0.6"; 12 13 src = fetchFromGitHub { 14 owner = "google"; 15 repo = "flatbuffers"; 16 rev = "v${version}"; 17 + sha256 = "sha256-0bJ0n/5yzj6lHXLKJzHUS0Bnlmys+X7pY/3LGapVh6k="; 18 }; 19 20 + nativeBuildInputs = [ cmake python3 ]; 21 22 + postPatch = '' 23 + # Fix default value of "test_data_path" to make tests work 24 + substituteInPlace tests/test.cpp --replace '"tests/";' '"../tests/";' 25 + ''; 26 27 cmakeFlags = [ 28 "-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" 29 + "-DFLATBUFFERS_OSX_BUILD_UNIVERSAL=OFF" 30 ]; 31 32 doCheck = stdenv.hostPlatform == stdenv.buildPlatform;