Skip to content

Commit

Permalink
craneUtils: build with rustPlatform (#431)
Browse files Browse the repository at this point in the history
* This should hopefully result in fewer surprises if someone is using a
  really ancient toolchain for their code since we'll use whatever is in
  nixpkgs to build craneUtils instead
  • Loading branch information
ipetkov authored Oct 17, 2023
1 parent d4bddd0 commit 159f71f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

### Changed
* `craneUtils` will now be built with the `rustPlatform` provided by nixpkgs
instead of the currently configured toolchain. This should hopefully result in
fewer surprises for those testing with really old MSRV toolchains.

## [0.14.2] - 2023-10-15

### Added
Expand Down
10 changes: 7 additions & 3 deletions pkgs/crane-utils/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{ buildDepsOnly
, buildPackage
, cargoClippy
, cargoFmt
, cleanCargoSource
, crateNameFromCargoToml
, path
, rustPlatform
}:

let
Expand All @@ -13,8 +14,11 @@ let
inherit src;
};
in
buildPackage {
inherit cargoArtifacts src;
rustPlatform.buildRustPackage {
inherit src;
inherit (crateNameFromCargoToml { inherit src; }) pname version;

cargoSha256 = "sha256-2mqTVhYsOxqD+F5f4yCPvz2jZ2bdAMBK1tgNMyVDtsA=";

passthru = {
checks = {
Expand Down

0 comments on commit 159f71f

Please sign in to comment.