2022-12-17 10:02:37 +00:00
|
|
|
{ lib, stdenv, fetchzip, autoreconfHook, pkg-config, gnumake42, glib, pcre
|
2021-08-10 14:31:46 +00:00
|
|
|
, json_c, flex, bison, dtc, pciutils, dmidecode, acpica-tools, libbsd }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fwts";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "23.07.00";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2021-08-08 23:34:03 +00:00
|
|
|
url = "https://fwts.ubuntu.com/release/${pname}-V${version}.tar.gz";
|
2023-10-09 19:29:22 +00:00
|
|
|
sha256 = "sha256-Fo5qdb0eT8taYfPAf5LQu0toNXcoVjNoDgeeAlUfbs4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
# fails with make 4.4
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config gnumake42 ];
|
2021-08-10 14:31:46 +00:00
|
|
|
buildInputs = [ glib pcre json_c flex bison dtc pciutils dmidecode acpica-tools libbsd ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-08-08 23:34:03 +00:00
|
|
|
substituteInPlace src/lib/include/fwts_binpaths.h \
|
|
|
|
--replace "/usr/bin/lspci" "${pciutils}/bin/lspci" \
|
|
|
|
--replace "/usr/sbin/dmidecode" "${dmidecode}/bin/dmidecode" \
|
2021-08-10 14:31:46 +00:00
|
|
|
--replace "/usr/bin/iasl" "${acpica-tools}/bin/iasl"
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
substituteInPlace src/lib/src/fwts_devicetree.c \
|
|
|
|
src/devicetree/dt_base/dt_base.c \
|
|
|
|
--replace "dtc -I" "${dtc}/bin/dtc -I"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://wiki.ubuntu.com/FirmwareTestSuite";
|
|
|
|
description = "Firmware Test Suite";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ tadfisher ];
|
|
|
|
};
|
|
|
|
}
|