forked from scientiac/swarmanoid
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
58 lines (50 loc) · 1.12 KB
/
flake.nix
File metadata and controls
58 lines (50 loc) · 1.12 KB
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
{
description = "Yantra Swarmanoid Environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = {
nixpkgs,
...
} : let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
python = let
packageOverrides = self: super: {
opencv4 = super.opencv4.override {
enableGtk2 = true;
gtk2 = pkgs.gnome2.gtk;
};
};
in
pkgs.python311.override {
inherit packageOverrides;
self = python;
};
pythonEnv = python.withPackages (ps:
with ps; [
opencv4
numpy
paho-mqtt
flask
# LSP
python-lsp-server
black
]);
dependencies = with pkgs; [
# Micropython Dependencies
screen
mosquitto
gopro
];
shellHook = ''
screen -S mqtt-session -dm mosquitto -c ./samples/mosquitto.conf
echo "Type 'screen -r mqtt-session' to get mqtt logs!"
'';
in {
devShells.${system}.default = pkgs.mkShell {
buildInputs = [pythonEnv] ++ dependencies;
shellHook = shellHook;
};
};
}