-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (49 loc) · 1.46 KB
/
flake.nix
File metadata and controls
55 lines (49 loc) · 1.46 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
{
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;
config.allowUnfree = true;
config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [ "gurobi" "gurobipy" ];
};
in {
formatter = pkgs.alejandra;
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
# Basic tools
bash
coreutils
curl
gnutar
gzip
# Nix tools
alejandra
# Python tools
python312
uv
];
shellHook = ''
echo "🐍 Python Docker Runner Development Environment"
echo "Available commands:"
echo " nix build .#packages.x86_64-linux.docker-image - Build Docker image"
echo " nix build .#docker-image - Build Docker image (short form)"
echo " nix fmt - Format Nix files"
echo ""
'';
};
packages = {
# Docker image package for CI/CD
docker-image = import ./docker.nix {inherit pkgs;};
};
}
);
}