Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a3eef72b6ec5
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b9c4bef0903b
Choose a head ref
  • 4 commits
  • 3 files changed
  • 2 contributors

Commits on Aug 16, 2019

  1. rustfmt: use the src as defined by the git submodule in rust

    This commit makes sure rustc and rustfmt are compatible by setting
    rustfmt's src to the rustfmt git submodule as defined in:
    
    https://github.com/rust-lang/rust/tree/1.36.0/src/tools
    basvandijk committed Aug 16, 2019
    Copy the full SHA
    16cb261 View commit details

Commits on Aug 19, 2019

  1. rustfmt: make sure to test rustfmt instead of rustc

    Co-Authored-By: symphorien <symphorien@users.noreply.github.com>
    basvandijk and symphorien authored Aug 19, 2019
    Copy the full SHA
    dc37421 View commit details
  2. rustfmt: enable tests

    basvandijk committed Aug 19, 2019
    Copy the full SHA
    4e5d4d5 View commit details
  3. Merge pull request #66713 from basvandijk/rustfmt-from-rust-src

    rustfmt: use the src as defined by the git submodule in rust
    basvandijk authored Aug 19, 2019
    Copy the full SHA
    b9c4bef View commit details
1 change: 1 addition & 0 deletions pkgs/development/compilers/rust/default.nix
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@
pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; };
pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmPackages_5.stdenv; };
});
rustfmt = self.callPackage ./rustfmt.nix { inherit Security; };
cargo = self.callPackage ./cargo.nix {
# Use boot package set to break cycle
rustPlatform = bootRustPlatform;
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
{ stdenv, fetchFromGitHub, rustPlatform, darwin }:
{ stdenv, rustPlatform, Security }:

rustPlatform.buildRustPackage rec {
name = "rustfmt-${version}";
version = "1.2.2";
inherit (rustPlatform.rust.rustc) version src;

src = fetchFromGitHub {
owner = "rust-lang";
repo = "rustfmt";
rev = "v${version}";
sha256 = "1k9p6sp8q87flx9vzg46880ir7likvbydai3g6q76278h86rn0v8";
};

cargoSha256 = "08x6vy5v2vgrk3gsw3qcvv52a7hifsgcsnsg1phlk1ikaff21y4z";
# the rust source tarball already has all the dependencies vendored, no need to fetch them again
cargoVendorDir = "vendor";
preBuild = "pushd src/tools/rustfmt";
preInstall = "popd";

buildInputs = stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security;
buildInputs = stdenv.lib.optional stdenv.isDarwin Security;

# As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
RUSTC_BOOTSTRAP = 1;
@@ -28,7 +24,7 @@ rustPlatform.buildRustPackage rec {
description = "A tool for formatting Rust code according to style guidelines";
homepage = https://github.com/rust-lang-nursery/rustfmt;
license = with licenses; [ mit asl20 ];
maintainers = [ maintainers.globin ];
maintainers = with maintainers; [ globin basvandijk ];
platforms = platforms.all;
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -8279,7 +8279,7 @@ in
rls = callPackage ../development/tools/rust/rls {
inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
};
rustfmt = callPackage ../development/tools/rust/rustfmt { };
rustfmt = rustPackages.rustfmt;
rustracer = callPackage ../development/tools/rust/racer {
inherit (darwin.apple_sdk.frameworks) Security;
};