2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2024-04-21 15:54:59 +00:00
|
|
|
, fetchFromGitHub
|
2022-05-18 14:49:53 +00:00
|
|
|
, bison
|
|
|
|
, flex
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "acpica-tools";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "20240322";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "acpica";
|
|
|
|
repo = "acpica";
|
|
|
|
rev = "refs/tags/G${version}";
|
|
|
|
hash = "sha256-k5rDaRKYPwdP4SmEXlrqsA2NLZDlqXBclz1Lwmufa2M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
nativeBuildInputs = [ bison flex ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildFlags = [
|
|
|
|
"acpibin"
|
|
|
|
"acpidump"
|
2021-08-05 21:33:18 +00:00
|
|
|
"acpiexamples"
|
2020-04-24 23:36:52 +00:00
|
|
|
"acpiexec"
|
|
|
|
"acpihelp"
|
2021-08-05 21:33:18 +00:00
|
|
|
"acpisrc"
|
2020-04-24 23:36:52 +00:00
|
|
|
"acpixtract"
|
2021-08-10 14:31:46 +00:00
|
|
|
"iasl"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString ([
|
2023-02-16 17:41:37 +00:00
|
|
|
"-O3"
|
2023-03-15 16:39:30 +00:00
|
|
|
]);
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
# i686 builds fail with hardening enabled (due to -Wformat-overflow). Disable
|
|
|
|
# -Werror altogether to make this derivation less fragile to toolchain
|
|
|
|
# updates.
|
|
|
|
NOWERROR = "TRUE";
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
# We can handle stripping ourselves.
|
2022-08-21 13:32:41 +00:00
|
|
|
# Unless we are on Darwin. Upstream makefiles degrade coreutils install to cp if _APPLE is detected.
|
|
|
|
INSTALLFLAGS = lib.optionals (!stdenv.isDarwin) "-m 555";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.acpica.org/";
|
2022-05-18 14:49:53 +00:00
|
|
|
description = "ACPICA Tools";
|
2021-08-05 21:33:18 +00:00
|
|
|
license = with licenses; [ iasl gpl2Only bsd3 ];
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ tadfisher ];
|
2022-08-21 13:32:41 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|