Adding run command for qhub in nix flake
nixpkgs-keycloak = { url = "github:costrouc/nixpkgs/python-keycloak"; };
};
- outputs = inputs@{ self, nixpkgs, nixpkgs-keycloak, ... }: {
- devShell.x86_64-linux =
+ 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;
- in pkgs.mkShell {
- buildInputs = [
+
+ propagatedDependencies = [
pythonPackages.cookiecutter
pythonPackages.ruamel-yaml
pythonPackages.cloudflare
pythonPackages.azure-mgmt-containerservice
pythonPackages.azure-identity
pythonPackages.boto3
+ ];
+ devDependencies = [
# development
pythonPackages.pytest
pythonPackages.black
pkgs.minikube
pkgs.k9s
];
+ in {
+ defaultApp.x86_64-linux = pythonPackages.buildPythonPackage {
+ pname = "qhub";
+ version = "latest";
+
+ src = ./.;
+
+ propagatedBuildInputs = propagatedDependencies;
+
+ patchPhase = ''
+ substituteInPlace setup.py \
+ --replace "cookiecutter==1.7.2" "cookiecutter" \
+ --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;
};
};
}
