2021-08-08 13:42:48 +01:00
|
|
|
{ lib, stdenv, fetchzip, autoreconfHook, pkg-config, glib, pcre
|
2021-08-08 11:59:48 +01:00
|
|
|
, json_c, flex, bison, dtc, pciutils, dmidecode, acpica-tools, libbsd }:
|
2018-02-12 07:14:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "fwts";
|
2021-08-10 07:28:00 +01:00
|
|
|
version = "21.07.00";
|
2018-02-12 07:14:59 +00:00
|
|
|
|
|
|
|
src = fetchzip {
|
2021-08-08 13:42:48 +01:00
|
|
|
url = "https://fwts.ubuntu.com/release/${pname}-V${version}.tar.gz";
|
2021-08-10 07:28:00 +01:00
|
|
|
sha256 = "sha256-cTm8R7sUJk5aTjXvsxfBXX0J/ehVoqo43ILZ6VqaPTI=";
|
2018-02-12 07:14:59 +00:00
|
|
|
stripRoot = false;
|
|
|
|
};
|
|
|
|
|
2021-08-08 13:42:48 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2021-08-08 11:59:48 +01:00
|
|
|
buildInputs = [ glib pcre json_c flex bison dtc pciutils dmidecode acpica-tools libbsd ];
|
2018-02-12 07:14:59 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
2021-08-08 13:42:48 +01:00
|
|
|
substituteInPlace src/lib/include/fwts_binpaths.h \
|
|
|
|
--replace "/usr/bin/lspci" "${pciutils}/bin/lspci" \
|
|
|
|
--replace "/usr/sbin/dmidecode" "${dmidecode}/bin/dmidecode" \
|
2021-08-08 11:59:48 +01:00
|
|
|
--replace "/usr/bin/iasl" "${acpica-tools}/bin/iasl"
|
2018-02-12 07:14:59 +00:00
|
|
|
'';
|
|
|
|
|
2018-12-19 19:37:57 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-12 07:14:59 +00:00
|
|
|
homepage = "https://wiki.ubuntu.com/FirmwareTestSuite";
|
|
|
|
description = "Firmware Test Suite";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ tadfisher ];
|
|
|
|
};
|
|
|
|
}
|