1{
2 stdenv,
3 lib,
4 fetchFromGitLab,
5 cmake,
6 pkg-config,
7 libusb1,
8 libftdi1,
9}:
10
11stdenv.mkDerivation {
12 pname = "fw-ectool";
13 version = "0-unstable-2024-04-23";
14
15 src = fetchFromGitLab {
16 domain = "gitlab.howett.net";
17 owner = "DHowett";
18 repo = "ectool";
19 rev = "abdd574ebe3640047988cb928bb6789a15dd1390";
20 hash = "sha256-j0Z2Uo1LBXlHZVHPm4Xjx3LZaI6Qq0nSdViyC/CjWC8=";
21 };
22
23 nativeBuildInputs = [
24 cmake
25 pkg-config
26 ];
27
28 buildInputs = [
29 libusb1
30 libftdi1
31 ];
32
33 installPhase = ''
34 runHook preInstall
35 install -Dm555 src/ectool "$out/bin/ectool"
36 runHook postInstall
37 '';
38
39 meta = with lib; {
40 description = "EC-Tool adjusted for usage with framework embedded controller";
41 homepage = "https://gitlab.howett.net/DHowett/ectool";
42 license = licenses.bsd3;
43 maintainers = [ maintainers.mkg20001 ];
44 platforms = platforms.linux;
45 mainProgram = "ectool";
46 };
47}