forked from nebari-dev/nebari
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
73 lines (61 loc) · 1.97 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
69
70
71
72
73
{
description = "QHub";
inputs = {
nixpkgs = { url = "github:nixos/nixpkgs/nixpkgs-unstable"; };
nixpkgs-keycloak = { url = "github:costrouc/nixpkgs/python-keycloak"; };
};
outputs = inputs@{ self, nixpkgs, nixpkgs-keycloak, ... }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
pythonPackages = pkgs.python3Packages;
keycloak = (import nixpkgs-keycloak { system = "x86_64-linux"; }).python3Packages.python-keycloak;
propagatedDependencies = [
pythonPackages.ruamel-yaml
pythonPackages.cloudflare
pythonPackages.auth0-python
pythonPackages.pydantic
pythonPackages.pynacl
pythonPackages.bcrypt
pythonPackages.kubernetes
pythonPackages.packaging
pythonPackages.rich
keycloak
# cloud packages
pythonPackages.azure-mgmt-containerservice
pythonPackages.azure-identity
pythonPackages.boto3
];
devDependencies = [
# development
pythonPackages.pytest
pythonPackages.pytest-timeout
pythonPackages.black
pythonPackages.flake8
pythonPackages.sphinx
pythonPackages.dask-gateway
pythonPackages.paramiko
pythonPackages.escapism
# additional
pkgs.minikube
pkgs.k9s
];
in rec {
defaultApp.x86_64-linux = pythonPackages.buildPythonPackage {
pname = "qhub";
version = "latest";
format = "pyproject";
src = ./.;
propagatedBuildInputs = propagatedDependencies;
patchPhase = ''
substituteInPlace setup.cfg \
--replace "azure-identity==1.6.1" "azure-identity" \
--replace "azure-mgmt-containerservice==16.2.0" "azure-mgmt-containerservice"
'';
doCheck = false;
};
devShell.x86_64-linux =
pkgs.mkShell {
buildInputs = propagatedDependencies ++ devDependencies ++ [ defaultApp.x86_64-linux ];
};
};
}