mirror of
https://git.adityakumar.xyz/monitor.git/
synced 2024-11-09 20:19:44 +00:00
36 lines
864 B
Nix
36 lines
864 B
Nix
{
|
|
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; [
|
|
libnotify
|
|
(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;
|
|
}
|
|
);
|
|
}
|