tvl-depot/fun/idual/default.nix
Vincent Ambo 4f1249e46f refactor(readTree): Move 'drvTargets' into readTree
This function is also generally useful for readTree consumers that
have the concept of subtargets.

Change-Id: Ic7fc03380dec6953fb288763a28e50ab3624d233
2021-11-23 14:42:08 +00:00

24 lines
657 B
Nix

{ depot, pkgs, lib, ... }:
let
inherit (pkgs) python3 python3Packages;
opts = {
pname = "idualctl";
version = "0.1";
src = ./.;
propagatedBuildInputs = [
depot.third_party.python.broadlink
];
};
package = python3Packages.buildPythonPackage opts;
script = python3Packages.buildPythonApplication opts;
in depot.nix.readTree.drvTargets {
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
'';
}