rustup-toolchain-install-master: 1.7.3 -> 1.9.0
This commit is contained in:
parent
281eb01683
commit
5cf49e9e97
File diff suppressed because it is too large
Load Diff
@ -2,48 +2,38 @@
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
runCommand,
|
||||
stdenv,
|
||||
patchelf,
|
||||
zlib,
|
||||
pkg-config,
|
||||
openssl,
|
||||
xz,
|
||||
replaceVars,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "rustup-toolchain-install-master";
|
||||
version = "1.7.3";
|
||||
version = "1.9.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kennytm";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-J25ER/g8Kylw/oTIEl4Gl8i1xmhR+4JM5M5EHpl1ras=";
|
||||
repo = "rustup-toolchain-install-master";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-0ayc4rzlZ9sLKzRhVr1fpRD7bmwQL69rkQ2jXBAdUPI=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
cargoHash = "sha256-VxrtkZbi9BprQOQFxOIAYEoAtg0kqyL3C4ih/5RobZI=";
|
||||
|
||||
patches =
|
||||
let
|
||||
patchelfPatch =
|
||||
runCommand "0001-dynamically-patchelf-binaries.patch"
|
||||
{
|
||||
CC = stdenv.cc;
|
||||
patchelf = patchelf;
|
||||
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 ];
|
||||
patches = lib.optional stdenv.hostPlatform.isLinux (
|
||||
replaceVars ./0001-dynamically-patchelf-binaries.patch {
|
||||
inherit patchelf;
|
||||
dynamicLinker = "${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2";
|
||||
libPath = lib.makeLibraryPath [
|
||||
zlib
|
||||
(placeholder "out" + "/lib")
|
||||
];
|
||||
}
|
||||
);
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
@ -51,11 +41,6 @@ rustPlatform.buildRustPackage rec {
|
||||
xz
|
||||
];
|
||||
|
||||
# update Cargo.lock to work with openssl 3
|
||||
postPatch = ''
|
||||
ln -sf ${./Cargo.lock} Cargo.lock
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Install a rustc master toolchain usable from rustup";
|
||||
mainProgram = "rustup-toolchain-install-master";
|
||||
@ -63,4 +48,4 @@ rustPlatform.buildRustPackage rec {
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user