-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathflake.nix
47 lines (45 loc) · 1.21 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
description = "Post a message to a matrix room with a simple HTTP POST";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
{
nixpkgs,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
matrix-webhook =
with pkgs.python3Packages;
buildPythonApplication {
pname = "matrix-webhook";
version = "3.9.1";
src = pkgs.nix-gitignore.gitignoreSource [ ./.nixignore ] ./.;
pyproject = true;
buildInputs = [ poetry-core ];
propagatedBuildInputs = [
markdown
matrix-nio
];
};
in
{
packages.default = matrix-webhook;
apps.default = flake-utils.lib.mkApp { drv = matrix-webhook; };
devShells.default = pkgs.mkShell {
inputsFrom = [ matrix-webhook ];
packages = with pkgs; [
poetry
python3Packages.coverage
python3Packages.httpx
python3Packages.safety
];
};
}
);
}