2021-04-10 18:05:16 +02:00
|
|
|
{ depot, pkgs, lib, ... }:
|
2020-04-25 23:17:14 +02:00
|
|
|
|
|
|
|
let
|
2021-04-10 18:05:16 +02:00
|
|
|
inherit (pkgs) python3 python3Packages;
|
2020-04-25 23:17:14 +02:00
|
|
|
|
|
|
|
opts = {
|
|
|
|
pname = "idualctl";
|
|
|
|
version = "0.1";
|
|
|
|
src = ./.;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2021-04-10 18:05:16 +02:00
|
|
|
depot.third_party.python.broadlink
|
2020-04-25 23:17:14 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
package = python3Packages.buildPythonPackage opts;
|
|
|
|
script = python3Packages.buildPythonApplication opts;
|
2021-11-23 14:31:17 +01:00
|
|
|
in
|
|
|
|
depot.nix.readTree.drvTargets {
|
2020-04-26 01:24:49 +02:00
|
|
|
inherit script;
|
|
|
|
python = python3.withPackages (_: [ package ]);
|
|
|
|
setAlarm = pkgs.writeShellScriptBin "set-alarm" ''
|
|
|
|
echo "setting an alarm for ''${1}"
|
|
|
|
${pkgs.systemd}/bin/systemd-run --user --on-calendar="''${1} Europe/London" --unit=light-alarm.service
|
|
|
|
'';
|
|
|
|
}
|