monitor/flake.nix

37 lines
864 B
Nix
Raw Normal View History

2024-09-10 14:14:33 +00:00
{
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};
flake-utils = {
url = "github:numtide/flake-utils";
};
};
outputs = { nixpkgs, flake-utils, self, ... }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
buildInputs = with pkgs; [
2024-09-11 02:23:02 +00:00
libnotify
2024-09-10 14:14:33 +00:00
(python3.withPackages(ps: with ps; [
ipython
requests
]))
];
monitor = pkgs.stdenv.mkDerivation {
name = "monitor";
propagatedBuildInputs = buildInputs;
dontUnpack = true;
installPhase = "install -Dm755 ${./monitor.py} $out/bin/monitor";
};
in rec {
devShell = pkgs.mkShell {
buildInputs = buildInputs;
shellHook = "";
};
packages.default = monitor;
}
);
}