mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
3f795bc578
Don't use the gcc-specific flags with other compilers.
55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchurl
|
|
, bison
|
|
, flex
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "acpica-tools";
|
|
version = "20221020";
|
|
|
|
src = fetchurl {
|
|
# 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=";
|
|
};
|
|
|
|
nativeBuildInputs = [ bison flex ];
|
|
|
|
buildFlags = [
|
|
"acpibin"
|
|
"acpidump"
|
|
"acpiexamples"
|
|
"acpiexec"
|
|
"acpihelp"
|
|
"acpisrc"
|
|
"acpixtract"
|
|
"iasl"
|
|
];
|
|
|
|
env.NIX_CFLAGS_COMPILE = toString ([
|
|
"-O3"
|
|
] ++ lib.optionals (stdenv.cc.isGNU) [
|
|
# Needed with GCC 12
|
|
"-Wno-dangling-pointer"
|
|
]);
|
|
|
|
enableParallelBuilding = 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";
|
|
|
|
installFlags = [ "PREFIX=${placeholder "out"}" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://www.acpica.org/";
|
|
description = "ACPICA Tools";
|
|
license = with licenses; [ iasl gpl2Only bsd3 ];
|
|
maintainers = with maintainers; [ tadfisher ];
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
};
|
|
}
|