nix/package/swayscript/default.nix

24 lines
467 B
Nix
Raw Normal View History

2024-12-18 11:11:25 +03:00
{
__findFile,
pkgs,
util,
...
}:
let
pipewire = pkgs.pipewire;
longogg = <static/Long.ogg>;
notificationogg = <static/Notification.ogg>;
shortogg = <static/Short.ogg>;
2024-12-18 11:13:33 +03:00
raw = pkgs.writeText "swayscript-raw" (util.readFiles (util.ls ./script));
2024-12-18 11:11:25 +03:00
script = pkgs.replaceVars raw {
inherit
pipewire
longogg
notificationogg
shortogg
;
};
in
pkgs.writeShellScriptBin "swayscript" (builtins.readFile script + "\n\${@}")