-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
68 lines (61 loc) · 2 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
description = "Time Table Generator";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShell = pkgs.mkShell {
buildInputs = [
pkgs.python310
pkgs.python310Packages.pip
pkgs.python310Packages.virtualenv
pkgs.nodejs
pkgs.docker
pkgs.docker-compose
pkgs.hypercorn
pkgs.mongodb
pkgs.rust
];
shellHook = ''
source venv/bin/activate
export MONGODB_CONNECTION_STRING="mongodb://localhost:27017/timetable"
export SECRET_KEY="your_secret_key"
'';
};
packages = {
default = pkgs.buildPythonPackage {
pname = "time-table-generator";
version = "1.0.0";
src = ./.;
propagatedBuildInputs = [
pkgs.python310Packages.fastapi
pkgs.python310Packages.uvicorn
pkgs.python310Packages.pydantic
pkgs.python310Packages.motor
pkgs.python310Packages.python-dotenv
pkgs.python310Packages.scikit-learn
pkgs.python310Packages.aiocache
pkgs.python310Packages.fastapi-limiter
pkgs.python310Packages.aiomcache
pkgs.python310Packages.hypercorn
pkgs.python310Packages.trello
pkgs.python310Packages.asana
pkgs.python310Packages.prometheus_client
pkgs.python310Packages.sentry-sdk
];
meta = with pkgs.lib; {
description = "A project to generate timetables";
license = licenses.mit;
maintainers = with maintainers; [ your-github-username ];
};
};
};
}
);
}