2021-12-06 16:07:01 +00:00
|
|
|
{ lib, stdenv, buildPackages, fetchurl, zlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "kexec-tools";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2.0.23";
|
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"
|
|
|
|
];
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "qmPNbH3ZWwbOumJAp/3GeSeJytp1plXmcUmHF1IkJBs=";
|
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 = [
|
|
|
|
"riscv64-linux" "riscv32-linux"
|
|
|
|
"sparc-linux" "sparc64-linux"
|
|
|
|
];
|
|
|
|
license = licenses.gpl2;
|
|
|
|
};
|
|
|
|
}
|