From a715aa7073c683cb791763b88f7e9af43a276963 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Mon, 9 Sep 2019 16:43:26 -0400 Subject: [PATCH] kexectools: fix build on i686 https://hydra.nixos.org/build/99957229 See: https://src.fedoraproject.org/rpms/kexec-tools/c/cb1e5463b5298b064e9b6c86ad6fe3505fec9298 Forward-cherry picked from commit dc051dfdef1e, but only conditionally for i686 to rebuild only where necessary. Discussion: PR #68380. --- pkgs/os-specific/linux/kexectools/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kexectools/default.nix b/pkgs/os-specific/linux/kexectools/default.nix index 3d3215e6b4b..d6fd7346f4f 100644 --- a/pkgs/os-specific/linux/kexectools/default.nix +++ b/pkgs/os-specific/linux/kexectools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, fetchurl, zlib }: +{ stdenv, buildPackages, fetchurl, zlib, fetchpatch }: stdenv.mkDerivation rec { pname = "kexec-tools"; @@ -18,6 +18,16 @@ stdenv.mkDerivation rec { depsBuildBuild = [ buildPackages.stdenv.cc ]; buildInputs = [ zlib ]; + patches = stdenv.lib.optionals stdenv.hostPlatform.isi686 [ + # fix build on i686 + # See: https://src.fedoraproject.org/rpms/kexec-tools/c/cb1e5463b5298b064e9b6c86ad6fe3505fec9298 + (fetchpatch { + name = "kexec-tools-2.0.20-fix-broken-multiboot2-buliding-for-i386.patch"; + url = "https://src.fedoraproject.org/rpms/kexec-tools/raw/cb1e5463b5298b064e9b6c86ad6fe3505fec9298/f/kexec-tools-2.0.20-fix-broken-multiboot2-buliding-for-i386.patch"; + sha256 = "1kzmcsbhwfdgxlc5s88ir0n494phww1j16yk0z42x09qlkxxkg0l"; + }) + ]; + meta = with stdenv.lib; { homepage = http://horms.net/projects/kexec/kexec-tools; description = "Tools related to the kexec Linux feature";