nixpkgs/pkgs/tools/system/acpica-tools/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

58 lines
1.3 KiB
Nix
Raw Normal View History

2022-05-14 23:30:47 +00:00
{ lib
, stdenv
, fetchurl
, bison
, flex
}:
stdenv.mkDerivation rec {
2019-07-10 03:35:42 +00:00
pname = "acpica-tools";
2023-05-08 21:19:49 +00:00
version = "20230331";
src = fetchurl {
2023-05-08 21:19:49 +00:00
url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
hash = "sha256-DF1pXWBaqmFwnzxj9XoambiQIpFyOZhEawgTtXrDEOI=";
};
2022-05-14 23:30:47 +00:00
nativeBuildInputs = [ bison flex ];
buildFlags = [
"acpibin"
"acpidump"
"acpiexamples"
"acpiexec"
"acpihelp"
"acpisrc"
"acpixtract"
2021-08-08 10:59:48 +00:00
"iasl"
];
env.NIX_CFLAGS_COMPILE = toString ([
2022-12-23 16:57:29 +00:00
"-O3"
] ++ lib.optionals (stdenv.cc.isGNU) [
2022-12-23 16:57:29 +00:00
# Needed with GCC 12
"-Wno-dangling-pointer"
]);
2022-05-14 23:30:47 +00:00
enableParallelBuilding = true;
# i686 builds fail with hardening enabled (due to -Wformat-overflow). Disable
# -Werror altogether to make this derivation less fragile to toolchain
# updates.
NOWERROR = "TRUE";
# We can handle stripping ourselves.
# Unless we are on Darwin. Upstream makefiles degrade coreutils install to cp if _APPLE is detected.
INSTALLFLAGS = lib.optionals (!stdenv.isDarwin) "-m 555";
2019-08-22 20:23:33 +00:00
installFlags = [ "PREFIX=${placeholder "out"}" ];
meta = with lib; {
homepage = "https://www.acpica.org/";
2022-05-14 23:30:47 +00:00
description = "ACPICA Tools";
license = with licenses; [ iasl gpl2Only bsd3 ];
maintainers = with maintainers; [ tadfisher ];
platforms = platforms.linux ++ platforms.darwin;
};
}