forked from timewave-computer/auction-arbitrage-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
55 lines (51 loc) · 1.58 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
{
description = "A flake providing a reproducible environment for arbitrage";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
cosmos-nix.url = "github:informalsystems/cosmos.nix";
};
outputs = { self, nixpkgs, flake-utils, cosmos-nix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ cosmos-nix.overlays.cosmosNixPackages ]; };
packageOverrides = pkgs.callPackage ./python-packages.nix { };
skipCheckTests = drv:
drv.overridePythonAttrs (old: { doCheck = false; });
python = pkgs.python312.override { inherit packageOverrides; };
pythonWithPackages = python.withPackages (ps:
with ps; [
cosmpy
schedule
python-dotenv
aiostream
pytest
pytest-asyncio
types-protobuf
types-pytz
types-setuptools
mypy
(skipCheckTests aiohttp)
(skipCheckTests aiodns)
]);
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs.buildPackages; [
gnumake
protobuf
protoc-gen-go
protoc-gen-go-grpc
mypy-protobuf
black
grpc
grpc_cli
ruff
];
packages = [ pythonWithPackages ];
shellHook = ''
export PYTHONPATH=src:build/gen
make proto
'';
};
});
}