From d96e8482331eaebc87139eb5453e2a21d0ec0153 Mon Sep 17 00:00:00 2001 From: superherointj <5861043+superherointj@users.noreply.github.com> Date: Sun, 21 Jan 2024 11:30:00 -0300 Subject: [PATCH] anbox: fix build Fixes: https://github.com/NixOS/nixpkgs/issues/282601 > error: redundant move in initialization --- pkgs/os-specific/linux/anbox/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/anbox/default.nix b/pkgs/os-specific/linux/anbox/default.nix index 856664fed806..ad03ba1aefb2 100644 --- a/pkgs/os-specific/linux/anbox/default.nix +++ b/pkgs/os-specific/linux/anbox/default.nix @@ -80,10 +80,13 @@ stdenv.mkDerivation rec { systemd ]; - # Flag needed by GCC 12 but unrecognized by GCC 9 (aarch64-linux default now) - env.NIX_CFLAGS_COMPILE = toString (lib.optionals (with stdenv; cc.isGNU && lib.versionAtLeast cc.version "12") [ - "-Wno-error=mismatched-new-delete" - ]); + env.CXXFLAGS = toString [ "-include cstdint" ]; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU (toString [ + "-Wno-error=redundant-move" + # Flag needed by GCC 12 but unrecognized by GCC 9 (aarch64-linux default now) + (lib.optionalString (lib.versionAtLeast stdenv.cc.version "12") "-Wno-error=mismatched-new-delete") + ]); prePatch = '' patchShebangs scripts