2022-05-19 14:39:52 +00:00
|
|
|
{ depot, pkgs, lib, ... }:
|
2020-09-30 03:42:59 +00:00
|
|
|
|
|
|
|
let
|
2022-05-19 14:39:52 +00:00
|
|
|
inherit (pkgs) python3 python3Packages;
|
2020-09-30 03:42:59 +00:00
|
|
|
|
|
|
|
opts = {
|
2022-05-19 14:39:52 +00:00
|
|
|
pname = "idualctl";
|
2020-09-30 03:42:59 +00:00
|
|
|
version = "0.1";
|
2022-05-19 14:39:52 +00:00
|
|
|
src = ./.;
|
2020-09-30 03:42:59 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-05-19 14:39:52 +00:00
|
|
|
depot.third_party.python.broadlink
|
2020-09-30 03:42:59 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
package = python3Packages.buildPythonPackage opts;
|
2022-05-19 14:39:52 +00:00
|
|
|
script = python3Packages.buildPythonApplication opts;
|
|
|
|
in
|
|
|
|
depot.nix.readTree.drvTargets {
|
2020-09-30 03:42:59 +00:00
|
|
|
inherit script;
|
2022-05-19 14:39:52 +00:00
|
|
|
python = python3.withPackages (_: [ package ]);
|
2020-09-30 03:42:59 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
}
|