-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
34 lines (32 loc) · 1.1 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
{
description = "Menstruation telegram frontend";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/695b3515251873e0a7e2021add4bba643c56cde3";
flake-utils.url = "github:numtide/flake-utils";
menstruation-backend.url = "github:kmein/menstruation.rs";
};
outputs = inputs: with inputs;
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
menstruation = inputs.menstruation-backend.defaultPackage.${system};
in {
devShell = pkgs.mkShell rec {
buildInputs = [
menstruation
(pkgs.writers.writeDashBin "run" ''
( ${pkgs.redis}/bin/redis-server &
${menstruation}/bin/menstruation_server
) &
${pkgs.python3Packages.poetry}/bin/poetry run menstruation-telegram
'')
];
MENSTRUATION_DEBUG = 1;
ROCKET_PORT = 8000;
MENSTRUATION_ENDPOINT = "http://localhost:${toString ROCKET_PORT}";
};
defaultPackage = self.packages.${system}.menstruation-telegram;
packages.menstruation-telegram = pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;
};
});
}