2022-05-18 14:49:53 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, bison
|
|
|
|
, flex
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "acpica-tools";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "20221020";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-01-11 07:51:40 +00:00
|
|
|
# 20221020 has a weird filename published: https://acpica.org/node/201
|
|
|
|
name = "acpica-unix-${version}.tar.gz";
|
|
|
|
url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar_0.gz";
|
|
|
|
hash = "sha256-M6LjlKygylfUAYr+PaNA361etFsbkwDoHdWV/aB88cU=";
|
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-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [
|
2023-02-16 17:41:37 +00:00
|
|
|
"-O3"
|
|
|
|
# Needed with GCC 12
|
|
|
|
"-Wno-dangling-pointer"
|
|
|
|
];
|
2022-05-18 14:49:53 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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 ];
|
2020-04-24 23:36:52 +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
|
|
|
};
|
|
|
|
}
|