mirror of
https://github.com/EdenQwQ/nixos.git
synced 2025-12-26 18:34:56 +08:00
swhkd: update package
This commit is contained in:
parent
0af4114413
commit
f7bc7da5fb
3 changed files with 10 additions and 31 deletions
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
|
||||
<policyconfig>
|
||||
<action id="com.github.swhkd.pkexec">
|
||||
<message>Authentication is required to run Simple Wayland Hotkey Daemon</message>
|
||||
<defaults>
|
||||
<allow_any>no</allow_any>
|
||||
<allow_inactive>no</allow_inactive>
|
||||
<allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/swhkd</annotate>
|
||||
</action>
|
||||
</policyconfig>
|
||||
|
|
@ -2,10 +2,8 @@
|
|||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
pkg-config,
|
||||
systemd,
|
||||
libgcc,
|
||||
udev,
|
||||
}:
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "swhkd";
|
||||
|
|
@ -22,24 +20,20 @@ rustPlatform.buildRustPackage {
|
|||
cargoHash = "sha256-LBbmFyddyw7vV5voctXq3L4U3Ddbh428j5XbI+td/dg=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
pkg-config
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
cp ${./com.github.swhkd.pkexec.policy} ./com.github.swhkd.pkexec.policy
|
||||
buildInputs = [
|
||||
udev
|
||||
];
|
||||
|
||||
install -D -m0444 -t "$out/share/polkit-1/actions" ./com.github.swhkd.pkexec.policy
|
||||
|
||||
substituteInPlace "$out/share/polkit-1/actions/com.github.swhkd.pkexec.policy" \
|
||||
--replace /usr/bin/swhkd \
|
||||
"$out/bin/swhkd"
|
||||
postBuild = ''
|
||||
$src/scripts/build-polkit-policy.sh --swhkd-path=$out/bin/swhkd
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
systemd
|
||||
libgcc
|
||||
];
|
||||
postInstall = ''
|
||||
install -D -m0444 ./com.github.swhkd.pkexec.policy -t $out/share/polkit-1/actions
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A drop-in replacement for sxhkd that works with wayland";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue