From d1d283ea9e5f474aebb6cc30ed675b506fb7a4fb Mon Sep 17 00:00:00 2001 From: Winter Date: Tue, 14 Feb 2023 22:59:13 -0500 Subject: [PATCH] rpm-ostree: fix on aarch64-linux by using GCC 11 and passing `-lgcc` See https://github.com/NixOS/nixpkgs/pull/209113 for context. This has to be done manually because rpm-ostree doesn't use the Cargo setup hooks (which automatically set this flag). --- pkgs/tools/misc/rpm-ostree/default.nix | 3 +++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 5 insertions(+) diff --git a/pkgs/tools/misc/rpm-ostree/default.nix b/pkgs/tools/misc/rpm-ostree/default.nix index 7b9b362d79355..95bcd8294d037 100644 --- a/pkgs/tools/misc/rpm-ostree/default.nix +++ b/pkgs/tools/misc/rpm-ostree/default.nix @@ -114,6 +114,9 @@ stdenv.mkDerivation rec { env NOCONFIGURE=1 ./autogen.sh ''; + # https://github.com/NixOS/nixpkgs/issues/201254 + NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc"; + meta = with lib; { description = "A hybrid image/package system. It uses OSTree as an image format, and uses RPM as a component model"; homepage = "https://coreos.github.io/rpm-ostree/"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b0908628da5b..160641ceff695 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11106,6 +11106,8 @@ with pkgs; rpm-ostree = callPackage ../tools/misc/rpm-ostree { gperf = gperf_3_0; + # https://github.com/NixOS/nixpkgs/issues/201254 + stdenv = if stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU then gcc11Stdenv else stdenv; }; rpm2targz = callPackage ../tools/archivers/rpm2targz { };