From ea6b6a46b6ebccd75a178ce7b331accf864e806f Mon Sep 17 00:00:00 2001 From: Daniel Thwaites Date: Sun, 2 Oct 2022 17:03:14 +0100 Subject: [PATCH] coreboot-configurator: init at 2022-08-22 --- .../misc/coreboot-configurator/default.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/tools/misc/coreboot-configurator/default.nix diff --git a/pkgs/tools/misc/coreboot-configurator/default.nix b/pkgs/tools/misc/coreboot-configurator/default.nix new file mode 100644 index 000000000000..bed689651a4b --- /dev/null +++ b/pkgs/tools/misc/coreboot-configurator/default.nix @@ -0,0 +1,43 @@ +{ lib +, stdenv +, fetchFromGitHub +, inkscape +, meson +, ninja +, pkg-config +, libyamlcpp +, nvramtool +, qtbase +, qtsvg +, wrapQtAppsHook +}: + +stdenv.mkDerivation { + pname = "coreboot-configurator"; + version = "unstable-2022-08-22"; + + src = fetchFromGitHub { + owner = "StarLabsLtd"; + repo = "coreboot-configurator"; + rev = "37c93e7e101a20f85be309904177b9404875cfd8"; + sha256 = "2pk+uJk1EnVNO2vO1zF9Q6TLpij69iRdr5DFiNcZlM0="; + }; + + nativeBuildInputs = [ inkscape meson ninja pkg-config wrapQtAppsHook ]; + buildInputs = [ libyamlcpp qtbase qtsvg ]; + + postPatch = '' + substituteInPlace src/application/*.cpp \ + --replace '/usr/bin/pkexec' 'sudo' \ + --replace '/usr/bin/systemctl' 'systemctl' \ + --replace '/usr/sbin/nvramtool' '${nvramtool}/bin/nvramtool' + ''; + + meta = with lib; { + description = "A simple GUI to change settings in Coreboot's CBFS"; + homepage = "https://support.starlabs.systems/kb/guides/coreboot-configurator"; + license = licenses.gpl2Only; + platforms = platforms.linux; + maintainers = with maintainers; [ danth ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3aef6eb81fd2..792a19be17a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3406,6 +3406,8 @@ with pkgs; acpidump-all coreboot-utils; + coreboot-configurator = libsForQt5.callPackage ../tools/misc/coreboot-configurator { }; + corosync = callPackage ../servers/corosync { }; cowsay = callPackage ../tools/misc/cowsay { };