Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,16 @@ Opsqueue's client libraries and binary itself are also available through `niv`.
2. Package the now available `opsqueue` library as part of your overlay, using e.g.

```nix
opsqueue = self.callPackage (sources.opsqueue + "/libs/opsqueue_python/opsqueue_python.nix") { };
opsqueue_client = self.callPackage (sources.opsqueue + "/libs/opsqueue_python/opsqueue_python.nix") { };
```

- If you want to override which Rust version is used, you can set the `rustToolchain` either in an overlay or by passing it as parameter directly to `callPackage`.
- If you want to override which Python version is used for the Python client, you can set `python` either in an overlay or by passing it as parameter directly to `callPackage`.

For example:

```nix
opsqueue_client = self.callPackage (sources.opsqueue + "/libs/opsqueue_python/opsqueue_python.nix") { python = mySpecialPython; };
```

## For devs modifying Opsqueue: Building, running, testing
Expand Down
5 changes: 4 additions & 1 deletion libs/opsqueue_python/opsqueue_python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@
opentelemetry-api,
opentelemetry-exporter-otlp,
opentelemetry-sdk,

# Downstream users can override which precise Python version is used.
# This is opt-in; by default we will use whatever 'python3' is in scope.
python ? (pkgs.python3),
}:
let
python = pkgs.python3;
sources = import ../../nix/sources.nix;
crane = import sources.crane { pkgs = pkgs; };
craneLib = crane.overrideToolchain (pkgs: rustToolchain);
Expand Down
Loading