coreboot-configurator: 2022-08-22 -> 2023-01-17, use pkexec instead of sudo.
Using pkexec, as the upstream application does, makes it possible to launch the application using its .desktop file, instead of needing to run it from the terminal.
This commit is contained in:
parent
3abe01e086
commit
be8868e936
|
@ -3,24 +3,27 @@
|
|||
, fetchFromGitHub
|
||||
, inkscape
|
||||
, meson
|
||||
, mkDerivation
|
||||
, ninja
|
||||
, pkg-config
|
||||
, pkexecPath ? "/run/wrappers/bin/pkexec"
|
||||
, yaml-cpp
|
||||
, nvramtool
|
||||
, systemd
|
||||
, qtbase
|
||||
, qtsvg
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
mkDerivation {
|
||||
pname = "coreboot-configurator";
|
||||
version = "unstable-2022-08-22";
|
||||
version = "unstable-2023-01-17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "StarLabsLtd";
|
||||
repo = "coreboot-configurator";
|
||||
rev = "37c93e7e101a20f85be309904177b9404875cfd8";
|
||||
sha256 = "2pk+uJk1EnVNO2vO1zF9Q6TLpij69iRdr5DFiNcZlM0=";
|
||||
rev = "944b575dc873c78627c352f9c1a1493981431a58";
|
||||
sha256 = "sha256-ReWQNzeoyTF66hVnevf6Kkrnt0/PqRHd3oyyPYtx+0M=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ inkscape meson ninja pkg-config wrapQtAppsHook ];
|
||||
|
@ -28,9 +31,15 @@ stdenv.mkDerivation {
|
|||
|
||||
postPatch = ''
|
||||
substituteInPlace src/application/*.cpp \
|
||||
--replace '/usr/bin/pkexec' 'sudo' \
|
||||
--replace '/usr/bin/systemctl' 'systemctl' \
|
||||
--replace '/usr/sbin/nvramtool' '${nvramtool}/bin/nvramtool'
|
||||
--replace '/usr/bin/pkexec' '${pkexecPath}' \
|
||||
--replace '/usr/bin/systemctl' '${lib.getBin systemd}/systemctl' \
|
||||
--replace '/usr/sbin/nvramtool' '${lib.getExe nvramtool}'
|
||||
|
||||
substituteInPlace src/resources/org.coreboot.nvramtool.policy \
|
||||
--replace '/usr/sbin/nvramtool' '${lib.getExe nvramtool}'
|
||||
|
||||
substituteInPlace src/resources/org.coreboot.reboot.policy \
|
||||
--replace '/usr/sbin/reboot' '${lib.getBin systemd}/reboot'
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
|
|
Loading…
Reference in a new issue