lol
1{
2 curl,
3 fetchgit,
4 lib,
5 libusb1,
6 pkg-config,
7 stdenv,
8}:
9
10stdenv.mkDerivation {
11 pname = "em100";
12 version = "0-unstable-2024-11-14";
13
14 src = fetchgit {
15 url = "https://review.coreboot.org/em100";
16 # No git tags available. Use latest rev from the main branch.
17 rev = "a78b4ba4774f05ecd7af495604b437113596d70e";
18 hash = "sha256-jzP56SMMiWiOynW17CFksi1VhpGt4oYYJrf4Rp9Vfs4=";
19 };
20
21 nativeBuildInputs = [ pkg-config ];
22
23 buildInputs = [
24 curl
25 libusb1
26 ];
27
28 buildFlags = [
29 "em100"
30 "makedpfw"
31 ];
32
33 doInstallCheck = true;
34
35 installPhase = ''
36 runHook preInstall
37 install -Dm755 em100 $out/bin/em100
38 install -Dm755 makedpfw $out/bin/makedpfw
39 install -Dm644 60-dediprog-em100pro.rules $out/lib/udev/rules.d/dediprog_em100.rules
40 runHook postInstall
41 '';
42
43 meta = with lib; {
44 homepage = "https://www.coreboot.org";
45 description = "Open source tool for the EM100 SPI flash emulator";
46 license = licenses.gpl2;
47 maintainers = with maintainers; [ felixsinger ];
48 platforms = platforms.linux;
49 mainProgram = "em100";
50 };
51}