mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 13:40:28 +03:00
Merge staging-next into staging
This commit is contained in:
commit
0c98bf3e85
61 changed files with 867 additions and 1801 deletions
|
@ -62,6 +62,21 @@ let
|
|||
|
||||
);
|
||||
|
||||
# Ensure the CLI uses our generated configFile
|
||||
wrappedBinaries = pkgs.runCommandLocal "apcupsd-wrapped-binaries"
|
||||
{ nativeBuildInputs = [ pkgs.makeWrapper ]; }
|
||||
''
|
||||
for p in "${lib.getBin pkgs.apcupsd}/bin/"*; do
|
||||
bname=$(basename "$p")
|
||||
makeWrapper "$p" "$out/bin/$bname" --add-flags "-f ${configFile}"
|
||||
done
|
||||
'';
|
||||
|
||||
apcupsdWrapped = pkgs.symlinkJoin {
|
||||
name = "apcupsd-wrapped";
|
||||
# Put wrappers first so they "win"
|
||||
paths = [ wrappedBinaries pkgs.apcupsd ];
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
|
@ -138,7 +153,7 @@ in
|
|||
} ];
|
||||
|
||||
# Give users access to the "apcaccess" tool
|
||||
environment.systemPackages = [ pkgs.apcupsd ];
|
||||
environment.systemPackages = [ apcupsdWrapped ];
|
||||
|
||||
# NOTE 1: apcupsd runs as root because it needs permission to run
|
||||
# "shutdown"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue