7 # We will resolve pkexec from the path because it has a setuid wrapper on
8 # NixOS meaning that we cannot just use the path from the nix store.
9 # Using the path to the wrapper here would make the package incompatible
10 # with non-NixOS systems.
11 , pkexecPath ? "pkexec"
22 pname = "coreboot-configurator";
23 version = "unstable-2023-01-17";
25 src = fetchFromGitHub {
26 owner = "StarLabsLtd";
27 repo = "coreboot-configurator";
28 rev = "944b575dc873c78627c352f9c1a1493981431a58";
29 sha256 = "sha256-ReWQNzeoyTF66hVnevf6Kkrnt0/PqRHd3oyyPYtx+0M=";
32 nativeBuildInputs = [ inkscape meson ninja pkg-config wrapQtAppsHook ];
33 buildInputs = [ yaml-cpp qtbase qtsvg ];
36 substituteInPlace src/application/*.cpp \
37 --replace '/usr/bin/pkexec' '${pkexecPath}' \
38 --replace '/usr/bin/systemctl' '${lib.getBin systemd}/systemctl' \
39 --replace '/usr/sbin/nvramtool' '${lib.getExe nvramtool}'
41 substituteInPlace src/resources/org.coreboot.nvramtool.policy \
42 --replace '/usr/sbin/nvramtool' '${lib.getExe nvramtool}'
44 substituteInPlace src/resources/org.coreboot.reboot.policy \
45 --replace '/usr/sbin/reboot' '${lib.getBin systemd}/reboot'
49 substituteInPlace $out/share/applications/coreboot-configurator.desktop \
50 --replace '/usr/bin/coreboot-configurator' 'coreboot-configurator'
54 description = "Simple GUI to change settings in Coreboot's CBFS";
55 homepage = "https://support.starlabs.systems/kb/guides/coreboot-configurator";
56 license = licenses.gpl2Only;
57 platforms = platforms.linux;
58 maintainers = with maintainers; [ danth ];
59 mainProgram = "coreboot-configurator";