Skip to content

Commit 3f10812

Browse files
authored
feat(rust-crane): update crane version to 0.19.0 (#1053)
fix(rust-crane): override cranePkgs cargo with dream2nix supplied cargo style(rust-crane): format
1 parent 7455742 commit 3f10812

File tree

2 files changed

+13
-141
lines changed

2 files changed

+13
-141
lines changed

modules/dream2nix/rust-crane/crane.nix

Lines changed: 0 additions & 112 deletions
This file was deleted.

modules/dream2nix/rust-crane/default.nix

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -77,21 +77,14 @@
7777
;
7878
};
7979

80-
crane = import ./crane.nix {
81-
inherit lib;
82-
inherit
83-
(config.deps)
84-
stdenv
85-
cargo
86-
craneSource
87-
jq
88-
zstd
89-
remarshal
90-
makeSetupHook
91-
writeText
92-
runCommand
93-
darwin
94-
;
80+
crane = import config.deps.craneSource {
81+
pkgs = config.deps.cranePkgs.appendOverlays [
82+
(
83+
final: prev: {
84+
cargo = config.deps.cargo;
85+
}
86+
)
87+
];
9588
};
9689

9790
vendoring = import ./vendor.nix {
@@ -191,14 +184,14 @@ in {
191184
rust-crane.depsDrv = {
192185
inherit version;
193186
name = pname + depsNameSuffix;
194-
package-func.func = config.deps.crane.buildDepsOnly;
187+
package-func.func = crane.buildDepsOnly;
195188
package-func.args = l.mkMerge [
196189
common
197190
depsArgs
198191
];
199192
};
200193

201-
package-func.func = config.deps.crane.buildPackage;
194+
package-func.func = crane.buildPackage;
202195
package-func.args = l.mkMerge [common buildArgs];
203196

204197
public = {
@@ -216,39 +209,30 @@ in {
216209
deps = {nixpkgs, ...}:
217210
l.mkMerge [
218211
(l.mapAttrs (_: l.mkDefault) {
219-
inherit crane;
220212
cargo = nixpkgs.cargo;
221213
craneSource = config.deps.fetchFromGitHub {
222214
owner = "ipetkov";
223215
repo = "crane";
224-
rev = "v0.15.0";
225-
sha256 = "sha256-xpW3VFUG7yE6UE6Wl0dhqencuENSkV7qpnpe9I8VbPw=";
216+
rev = "v0.19.0";
217+
sha256 = "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=";
226218
};
219+
cranePkgs = nixpkgs.pkgs;
227220
})
228221
# maybe it would be better to put these under `options.rust-crane.deps` instead of this `deps`
229222
# since it conflicts with a lot of stuff?
230223
(l.mapAttrs (_: l.mkOverride 999) {
231224
inherit
232225
(nixpkgs)
233-
stdenv
234226
fetchurl
235227
jq
236-
zstd
237-
remarshal
238228
moreutils
239229
python3Packages
240-
makeSetupHook
241230
runCommandLocal
242-
runCommand
243231
writeText
244232
fetchFromGitHub
245233
libiconv
246234
mkShell
247235
;
248-
inherit
249-
(nixpkgs.pkgsBuildBuild)
250-
darwin
251-
;
252236
inherit
253237
(nixpkgs.writers)
254238
writePython3

0 commit comments

Comments
 (0)