Skip to content
Merged
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
19 changes: 12 additions & 7 deletions nix/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ let
]
++ lib.optionals stdenv'.hostPlatform.isLinux [ makeWrapper ]
++ lib.optionals stdenv'.hostPlatform.isDarwin [
# TODO: move to overlay so it's usable in the shell
(cargo-bundle.overrideAttrs (
new: old: {
version = "0.6.1-zed";
Expand All @@ -106,12 +105,18 @@ let
rev = "2be2669972dff3ddd4daf89a2cb29d2d06cad7c7";
hash = "sha256-cSvW0ND148AGdIGWg/ku0yIacVgW+9f1Nsi+kAQxVrI=";
};
# https://nixos.asia/en/buildRustPackage
cargoDeps = old.cargoDeps.overrideAttrs ({
inherit src;
name = "${new.pname}-${new.version}-vendor.tar.gz";
outputHash = "sha256-Q49FnXNHWhvbH1LtMUpXFcvGKu9VHwqOXXd+MjswO64=";
});
cargoHash = "sha256-urn+A3yuw2uAO4HGmvQnKvWtHqvG9KHxNCCWTiytE4k=";

# NOTE: can drop once upstream uses `finalAttrs` here:
# https://github.com/NixOS/nixpkgs/blob/10214747f5e6e7cb5b9bdf9e018a3c7b3032f5af/pkgs/build-support/rust/build-rust-package/default.nix#L104
#
# See (for context): https://github.com/NixOS/nixpkgs/pull/382550
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (new) src;
hash = new.cargoHash;
patches = new.cargoPatches or [];
name = new.cargoDepsName or new.finalPackage.name;
};
}
))
];
Expand Down
Loading