1{
2 lib,
3 mkDerivation,
4 fetchFromGitHub,
5 qtbase,
6 qmake,
7 cmake,
8 zip,
9}:
10
11mkDerivation rec {
12 pname = "uefitool";
13 version = "0.28.0";
14
15 src = fetchFromGitHub {
16 hash = "sha256-StqrOMsKst2X2yQQ/Xl7iLAuA4QXEOyj2KtE7ZtoUNg=";
17 owner = "LongSoft";
18 repo = "uefitool";
19 tag = version;
20 };
21
22 buildInputs = [ qtbase ];
23 nativeBuildInputs = [
24 qmake
25 cmake
26 zip
27 ];
28
29 dontConfigure = true;
30 buildPhase = ''
31 bash unixbuild.sh
32 '';
33
34 installPhase = ''
35 mkdir -p "$out"/bin
36 cp UEFITool UEFIReplace/UEFIReplace UEFIPatch/UEFIPatch "$out"/bin
37 '';
38
39 meta = {
40 description = "UEFI firmware image viewer and editor";
41 homepage = "https://github.com/LongSoft/uefitool";
42 license = lib.licenses.bsd2;
43 maintainers = with lib.maintainers; [ athre0z ];
44 # uefitool supposedly works on other platforms, but their build script only works on linux in nixpkgs
45 platforms = lib.platforms.linux;
46 mainProgram = "UEFITool";
47 };
48}