Skip to content

Commit

Permalink
refactor(rust-crane): don't overlay the pkgs for crane, use the overr…
Browse files Browse the repository at this point in the history
…ideToolchain api instead (#1069)
  • Loading branch information
yusdacra authored Nov 4, 2024
1 parent 7acdae7 commit 51943fc
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions modules/dream2nix/rust-crane/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,13 @@
;
};

crane = import config.deps.craneSource {
pkgs = config.deps.cranePkgs.appendOverlays [
(
final: prev: {
cargo = config.deps.cargo;
}
)
];
_crane = import config.deps.craneSource {
pkgs = config.deps.cranePkgs;
};
crane =
if config.deps.mkRustToolchain != null
then _crane.overrideToolchain config.deps.mkRustToolchain
else _crane;

vendoring = import ./vendor.nix {
inherit dreamLock getSource lib;
Expand Down Expand Up @@ -209,14 +207,14 @@ in {
deps = {nixpkgs, ...}:
l.mkMerge [
(l.mapAttrs (_: l.mkDefault) {
cargo = nixpkgs.cargo;
craneSource = config.deps.fetchFromGitHub {
owner = "ipetkov";
repo = "crane";
rev = "v0.19.0";
sha256 = "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=";
};
cranePkgs = nixpkgs.pkgs;
mkRustToolchain = null;
})
# maybe it would be better to put these under `options.rust-crane.deps` instead of this `deps`
# since it conflicts with a lot of stuff?
Expand Down

0 comments on commit 51943fc

Please sign in to comment.