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: bcd8c6b8dce4
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 778f31782053
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 18, 2020

  1. rustPackages: make rustc-dev optional

    This was only introduced in 1.40.0 and doesn't work on older versions.
    
        thread 'main' panicked at 'Error: no rules matched rustc-dev.', src/bootstrap/builder.rs:231:21
        note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
        failed to run: /build/rustc-1.38.0-src/build/bootstrap/debug/bootstrap dist rustc-dev
    LnL7 committed Jan 18, 2020
    Copy the full SHA
    8df4338 View commit details

Commits on Jan 20, 2020

  1. Merge pull request #77972 from LnL7/enable-rustc-dev

    rustPackages: make rustc-dev optional
    LnL7 authored Jan 20, 2020
    Copy the full SHA
    778f317 View commit details
Showing with 6 additions and 1 deletion.
  1. +1 −0 pkgs/development/compilers/rust/1_38_0.nix
  2. +2 −0 pkgs/development/compilers/rust/default.nix
  3. +3 −1 pkgs/development/compilers/rust/rustc.nix
1 change: 1 addition & 0 deletions pkgs/development/compilers/rust/1_38_0.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import ./default.nix {
rustcVersion = "1.38.0";
rustcSha256 = "101dlpsfkq67p0hbwx4acqq6n90dj4bbprndizpgh1kigk566hk4";
enableRustcDev = false;

# Note: the version MUST be one version prior to the version we're
# building
2 changes: 2 additions & 0 deletions pkgs/development/compilers/rust/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ rustcVersion
, rustcSha256
, enableRustcDev ? true
, bootstrapVersion
, bootstrapHashes
, selectRustPackage
@@ -70,6 +71,7 @@
rustc = self.callPackage ./rustc.nix ({
version = rustcVersion;
sha256 = rustcSha256;
inherit enableRustcDev;

# Use boot package set to break cycle
rustPlatform = bootRustPlatform;
4 changes: 3 additions & 1 deletion pkgs/development/compilers/rust/rustc.nix
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
, pkgconfig, openssl
, which, libffi
, withBundledLLVM ? false
, enableRustcDev ? true
, version
, sha256
}:
@@ -132,12 +133,13 @@ in stdenv.mkDerivation rec {
outputs = [ "out" "man" "doc" ];
setOutputFlags = false;

postInstall = ''
postInstall = stdenv.lib.optionalString enableRustcDev ''
# install rustc-dev components. Necessary to build rls, clippy...
python x.py dist rustc-dev
tar xf build/dist/rustc-dev*tar.gz
cp -r rustc-dev*/rustc-dev*/lib/* $out/lib/
'' + ''
# remove references to llvm-config in lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
# and thus a transitive dependency on ncurses
find $out/lib -name "*.so" -type f -exec remove-references-to -t ${llvmShared} '{}' '+'