diff options
author | Sebastián Mancilla <smancill@smancill.dev> | 2022-07-22 18:46:13 -0400 |
---|---|---|
committer | Sebastián Mancilla <smancill@smancill.dev> | 2022-07-26 00:00:38 -0400 |
commit | 8a8c18b31e5f34cbdce47271571ed39e730aeb88 (patch) | |
tree | d1cdfffd08fea0ec4bec270bf16c7c1c57b4352a | |
parent | 77bdbd88b5580a532f239b9a11706e15f39979cf (diff) | |
download | nixpkgs-8a8c18b31e5f34cbdce47271571ed39e730aeb88.tar nixpkgs-8a8c18b31e5f34cbdce47271571ed39e730aeb88.tar.gz nixpkgs-8a8c18b31e5f34cbdce47271571ed39e730aeb88.tar.bz2 nixpkgs-8a8c18b31e5f34cbdce47271571ed39e730aeb88.tar.lz nixpkgs-8a8c18b31e5f34cbdce47271571ed39e730aeb88.tar.xz nixpkgs-8a8c18b31e5f34cbdce47271571ed39e730aeb88.tar.zst nixpkgs-8a8c18b31e5f34cbdce47271571ed39e730aeb88.zip |
flatbuffers: 2.0.0 -> 2.0.6
- Looks like the tests need access to files in the '<srcdir>/tests' directory, so this path needs to be patched now. (Apparently upstream uses 'cmake .', and something broke between the versions for out of source builds.) - Python is needed to generate tests, according to CMake output. - Disable generation of universal binaries on Darwin.
-rw-r--r-- | pkgs/development/libraries/flatbuffers/default.nix | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/pkgs/development/libraries/flatbuffers/default.nix b/pkgs/development/libraries/flatbuffers/default.nix index a6eefe77c46..d5675990cc3 100644 --- a/pkgs/development/libraries/flatbuffers/default.nix +++ b/pkgs/development/libraries/flatbuffers/default.nix @@ -3,33 +3,30 @@ , fetchFromGitHub , fetchpatch , cmake +, python3 }: stdenv.mkDerivation rec { pname = "flatbuffers"; - version = "2.0.0"; + version = "2.0.6"; src = fetchFromGitHub { owner = "google"; repo = "flatbuffers"; rev = "v${version}"; - sha256 = "1zbf6bdpps8369r1ql00irxrp58jnalycc8jcapb8iqg654vlfz8"; + sha256 = "sha256-0bJ0n/5yzj6lHXLKJzHUS0Bnlmys+X7pY/3LGapVh6k="; }; - patches = [ - # Pull patch pending upstream inclustion for gcc-12 support: - # https://github.com/google/flatbuffers/pull/6946 - (fetchpatch { - name = "gcc-12.patch"; - url = "https://github.com/google/flatbuffers/commit/17d9f0c4cf47a9575b4f43a2ac33eb35ba7f9e3e.patch"; - sha256 = "0sksk47hi7camja9ppnjr88jfdgj0nxqxy8976qs1nx73zkgbpf9"; - }) - ]; + nativeBuildInputs = [ cmake python3 ]; - nativeBuildInputs = [ cmake ]; + postPatch = '' + # Fix default value of "test_data_path" to make tests work + substituteInPlace tests/test.cpp --replace '"tests/";' '"../tests/";' + ''; cmakeFlags = [ "-DFLATBUFFERS_BUILD_TESTS=${if doCheck then "ON" else "OFF"}" + "-DFLATBUFFERS_OSX_BUILD_UNIVERSAL=OFF" ]; doCheck = stdenv.hostPlatform == stdenv.buildPlatform; |