rustup-toolchain-install-master: 1.7.3 -> 1.9.0

This commit is contained in:
Marie Ramlow 2025-08-07 13:05:43 +02:00
parent 281eb01683
commit 5cf49e9e97
2 changed files with 18 additions and 1702 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,48 +2,38 @@
lib, lib,
rustPlatform, rustPlatform,
fetchFromGitHub, fetchFromGitHub,
runCommand,
stdenv, stdenv,
patchelf, patchelf,
zlib, zlib,
pkg-config, pkg-config,
openssl, openssl,
xz, xz,
replaceVars,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage (finalAttrs: {
pname = "rustup-toolchain-install-master"; pname = "rustup-toolchain-install-master";
version = "1.7.3"; version = "1.9.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kennytm"; owner = "kennytm";
repo = pname; repo = "rustup-toolchain-install-master";
rev = "v${version}"; tag = "v${finalAttrs.version}";
hash = "sha256-J25ER/g8Kylw/oTIEl4Gl8i1xmhR+4JM5M5EHpl1ras="; hash = "sha256-0ayc4rzlZ9sLKzRhVr1fpRD7bmwQL69rkQ2jXBAdUPI=";
}; };
cargoLock = { cargoHash = "sha256-VxrtkZbi9BprQOQFxOIAYEoAtg0kqyL3C4ih/5RobZI=";
lockFile = ./Cargo.lock;
};
patches = patches = lib.optional stdenv.hostPlatform.isLinux (
let replaceVars ./0001-dynamically-patchelf-binaries.patch {
patchelfPatch = inherit patchelf;
runCommand "0001-dynamically-patchelf-binaries.patch" dynamicLinker = "${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2";
{ libPath = lib.makeLibraryPath [
CC = stdenv.cc; zlib
patchelf = patchelf; (placeholder "out" + "/lib")
libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}"; ];
} }
'' );
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
--subst-var patchelf \
--subst-var dynamicLinker \
--subst-var libPath
'';
in
lib.optionals stdenv.hostPlatform.isLinux [ patchelfPatch ];
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ buildInputs = [
@ -51,11 +41,6 @@ rustPlatform.buildRustPackage rec {
xz xz
]; ];
# update Cargo.lock to work with openssl 3
postPatch = ''
ln -sf ${./Cargo.lock} Cargo.lock
'';
meta = with lib; { meta = with lib; {
description = "Install a rustc master toolchain usable from rustup"; description = "Install a rustc master toolchain usable from rustup";
mainProgram = "rustup-toolchain-install-master"; mainProgram = "rustup-toolchain-install-master";
@ -63,4 +48,4 @@ rustPlatform.buildRustPackage rec {
license = licenses.mit; license = licenses.mit;
maintainers = [ ]; maintainers = [ ];
}; };
} })