2022-08-12 12:06:08 +00:00
|
|
|
{ lib, stdenv, buildPackages, fetchurl, fetchpatch, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kexec-tools";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.0.28";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
urls = [
|
|
|
|
"mirror://kernel/linux/utils/kernel/kexec/${pname}-${version}.tar.xz"
|
|
|
|
"http://horms.net/projects/kexec/kexec-tools/${pname}-${version}.tar.xz"
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-0vDvhy854v5LGwH+tisAATgyByObn4BB+YqVVkFh0FM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
patches = [
|
|
|
|
# Use ELFv2 ABI on ppc64be
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/void-linux/void-packages/6c1192cbf166698932030c2e3de71db1885a572d/srcpkgs/kexec-tools/patches/ppc64-elfv2.patch";
|
|
|
|
sha256 = "19wzfwb0azm932v0vhywv4221818qmlmvdfwpvvpfyw4hjsc2s1l";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
hardeningDisable = [ "format" "pic" "relro" "pie" ];
|
|
|
|
|
2020-06-18 07:06:33 +00:00
|
|
|
# Prevent kexec-tools from using uname to detect target, which is wrong in
|
|
|
|
# cases like compiling for aarch32 on aarch64
|
|
|
|
configurePlatforms = [ "build" "host" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
configureFlags = [ "BUILD_CC=${buildPackages.stdenv.cc.targetPrefix}cc" ];
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
|
|
|
buildInputs = [ zlib ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://horms.net/projects/kexec/kexec-tools";
|
|
|
|
description = "Tools related to the kexec Linux feature";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
badPlatforms = [
|
2024-01-02 11:29:13 +00:00
|
|
|
"microblaze-linux" "microblazeel-linux"
|
2020-04-24 23:36:52 +00:00
|
|
|
"riscv64-linux" "riscv32-linux"
|
|
|
|
"sparc-linux" "sparc64-linux"
|
|
|
|
];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|