From f51dc9526531f3438c96b569d6146877f794224f Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Wed, 11 May 2022 22:31:11 -0500 Subject: [PATCH] flatbuffers: remove version 1.12 It has not been updated upstream for over two years, and it is starting to become time consuming to maintain. --- .../libraries/flatbuffers/1.12.nix | 26 ------------------- .../development/libraries/flatbuffers/2.0.nix | 16 ------------ .../flatbuffers/{generic.nix => default.nix} | 19 +++++++++----- pkgs/top-level/aliases.nix | 2 ++ pkgs/top-level/all-packages.nix | 4 +-- 5 files changed, 15 insertions(+), 52 deletions(-) delete mode 100644 pkgs/development/libraries/flatbuffers/1.12.nix delete mode 100644 pkgs/development/libraries/flatbuffers/2.0.nix rename pkgs/development/libraries/flatbuffers/{generic.nix => default.nix} (67%) diff --git a/pkgs/development/libraries/flatbuffers/1.12.nix b/pkgs/development/libraries/flatbuffers/1.12.nix deleted file mode 100644 index 1ad490d3a01..00000000000 --- a/pkgs/development/libraries/flatbuffers/1.12.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ callPackage, fetchpatch, lib, stdenv }: - -callPackage ./generic.nix { - version = "1.12.0"; - sha256 = "0f7xd66vc1lzjbn7jzd5kyqrgxpsfxi4zc7iymhb5xrwyxipjl1g"; - - patches = [ - (fetchpatch { - # Fixed a compilation error with GCC 10.0 to 11.0. June 1, 2020. - # Should be included in the next release after 1.12.0 - url = "https://github.com/google/flatbuffers/commit/988164f6e1675bbea9c852e2d6001baf4d1fcf59.patch"; - sha256 = "0d8c2bywqmkhdi0a41cry85wy4j58pl0vd6h5xpfqm3fr8w0mi9s"; - excludes = [ "src/idl_gen_cpp.cpp" ]; - }) - (fetchpatch { - # Fixed a compilation error with GCC 10.0 to 11.0. July 6, 2020. - # Should be included in the next release after 1.12.0 - url = "https://github.com/google/flatbuffers/pull/6020/commits/44c7a4cf439b0a298720b5a448bcc243a882b0c9.patch"; - sha256 = "126xwkvnlc4ignjhxv9jygfd9j6kr1jx39hyk0ddpcmvzfqsccf4"; - }) - ]; - - preConfigure = lib.optionalString stdenv.buildPlatform.isDarwin '' - rm BUILD - ''; -} diff --git a/pkgs/development/libraries/flatbuffers/2.0.nix b/pkgs/development/libraries/flatbuffers/2.0.nix deleted file mode 100644 index 27b661ee090..00000000000 --- a/pkgs/development/libraries/flatbuffers/2.0.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ callPackage, fetchpatch }: - -callPackage ./generic.nix { - version = "2.0.0"; - sha256 = "1zbf6bdpps8369r1ql00irxrp58jnalycc8jcapb8iqg654vlfz8"; - - 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"; - }) - ]; -} diff --git a/pkgs/development/libraries/flatbuffers/generic.nix b/pkgs/development/libraries/flatbuffers/default.nix similarity index 67% rename from pkgs/development/libraries/flatbuffers/generic.nix rename to pkgs/development/libraries/flatbuffers/default.nix index c06dad87d95..a6eefe77c46 100644 --- a/pkgs/development/libraries/flatbuffers/generic.nix +++ b/pkgs/development/libraries/flatbuffers/default.nix @@ -1,25 +1,30 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , cmake -, version -, sha256 -, patches ? [ ] -, preConfigure ? null }: stdenv.mkDerivation rec { pname = "flatbuffers"; - inherit version; + version = "2.0.0"; src = fetchFromGitHub { owner = "google"; repo = "flatbuffers"; rev = "v${version}"; - inherit sha256; + sha256 = "1zbf6bdpps8369r1ql00irxrp58jnalycc8jcapb8iqg654vlfz8"; }; - inherit patches preConfigure; + 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 ]; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 38d1e796db4..d213a4b2a1f 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -403,6 +403,8 @@ mapAliases ({ flashplayer-standalone = throw "flashplayer-standalone has been removed as Adobe Flash Player is now deprecated"; # Added 2021-02-07 flashplayer = throw "flashplayer has been removed as Adobe Flash Player is now deprecated"; # Added 2021-02-07 flashtool = throw "flashtool was removed from nixpkgs, because the download is down for copyright reasons and the site looks very fishy"; # Added 2021-06-31 + flatbuffers_1_12 = throw "FlatBuffers version 1.12 has been removed, because upstream no longer maintains it"; # Added 2022-05-12 + flatbuffers_2_0 = flatbuffers; # Added 2022-05-12 flink_1_5 = throw "flink_1_5 was removed, use flink instead"; # Added 2021-01-25 flutter-beta = throw "Non-stable versions of Flutter have been removed. You can use flutterPackages.mkFlutter to generate a package for other Flutter versions"; # Added 2020-01-15 flutter-dev = throw "Non-stable versions of Flutter have been removed. You can use flutterPackages.mkFlutter to generate a package for other Flutter versions"; # Added 2020-01-15 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e89aa5c04a8..982826f81fd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20135,9 +20135,7 @@ with pkgs; protozero = callPackage ../development/libraries/protozero { }; - flatbuffers = flatbuffers_2_0; - flatbuffers_2_0 = callPackage ../development/libraries/flatbuffers/2.0.nix { }; - flatbuffers_1_12 = callPackage ../development/libraries/flatbuffers/1.12.nix { }; + flatbuffers = callPackage ../development/libraries/flatbuffers { }; nanopb = callPackage ../development/libraries/nanopb { };