diff --git a/libs/opsqueue_python/opsqueue_python.nix b/libs/opsqueue_python/opsqueue_python.nix index 748cdad..58f6c62 100644 --- a/libs/opsqueue_python/opsqueue_python.nix +++ b/libs/opsqueue_python/opsqueue_python.nix @@ -3,8 +3,14 @@ pkgs, lib, - # Rust version. (Override this with an overlay if you like) - rustToolchain, + # Downstream users can override which Rust version is used. + # But this is opt-in. By default we'll use the same version + # that we use in this repo for development. + rustToolchain ? ( + (lib.fix (final: pkgs // (import (import ../../nix/sources.nix).rust-overlay) final pkgs)) + .rust-bin.fromRustupToolchainFile + ../../rust-toolchain.toml + ), # Native build dependencies: maturin, diff --git a/opsqueue/opsqueue.nix b/opsqueue/opsqueue.nix index 6abf55c..d9cf77b 100644 --- a/opsqueue/opsqueue.nix +++ b/opsqueue/opsqueue.nix @@ -1,8 +1,16 @@ { pkgs, lib, - rustToolchain, git, + + # Downstream users can override which Rust version is used. + # But this is opt-in. By default we'll use the same version + # that we use in this repo for development. + rustToolchain ? ( + (lib.fix (final: pkgs // (import (import ./nix/sources.nix).rust-overlay) final pkgs)) + .rust-bin.fromRustupToolchainFile + ./rust-toolchain.toml + ), }: let sources = import ../nix/sources.nix;