From aef6830d3e59d554dea2cb96c07326922cffe416 Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sun, 30 Sep 2018 12:56:02 +0200 Subject: [PATCH 1/2] rustc: 1.29.0 -> 1.29.1 From the changelog: - The standard library's `str::repeat` function contained an out of bounds write caused by an integer overflow. This has been fixed by deterministically panicking when an overflow happens. --- pkgs/development/compilers/rust/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/rust/default.nix b/pkgs/development/compilers/rust/default.nix index 47415ac9177..7d785093f9b 100644 --- a/pkgs/development/compilers/rust/default.nix +++ b/pkgs/development/compilers/rust/default.nix @@ -6,11 +6,11 @@ let rustPlatform = recurseIntoAttrs (makeRustPlatform (callPackage ./bootstrap.nix {})); - version = "1.29.0"; - cargoVersion = "1.29.0"; + version = "1.29.1"; + cargoVersion = "1.29.1"; src = fetchurl { url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; - sha256 = "1sb15znckj8pc8q3g7cq03pijnida6cg64yqmgiayxkzskzk9sx4"; + sha256 = "0jd3c57x3yndizns4pb68nh25si47agfmrdvf9nwwsyfcs5p5c7i"; }; in rec { rustc = callPackage ./rustc.nix { From 6ad43a0bce3603b25bcadb458d39701616d245f4 Mon Sep 17 00:00:00 2001 From: Edward Tate Date: Sun, 30 Sep 2018 16:03:35 +0200 Subject: [PATCH 2/2] buildRustPackage now correctly installs binaries to bin and libraries to lib. --- pkgs/build-support/rust/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/rust/default.nix b/pkgs/build-support/rust/default.nix index 1d5de052f89..ec4514121c2 100644 --- a/pkgs/build-support/rust/default.nix +++ b/pkgs/build-support/rust/default.nix @@ -91,8 +91,10 @@ in stdenv.mkDerivation (args // { installPhase = args.installPhase or '' runHook preInstall - mkdir -p $out/bin - find target/release -maxdepth 1 -executable -type f -exec cp "{}" $out/bin \; + mkdir -p $out/bin $out/lib + find target/release -maxdepth 1 -type f -executable ! \( -regex ".*.\(so.[0-9.]+\|so\|a\|dylib\)" \) -print0 | xargs -r -0 cp -t $out/bin + find target/release -maxdepth 1 -regex ".*.\(so.[0-9.]+\|so\|a\|dylib\)" -print0 | xargs -r -0 cp -t $out/lib + rmdir --ignore-fail-on-non-empty $out/lib $out/bin runHook postInstall '';