Files
nixpkgs/pkgs/development/tools/rust/rustup-toolchain-install-master/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

52 lines
1.2 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
patchelf,
zlib,
pkg-config,
openssl,
xz,
replaceVars,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "rustup-toolchain-install-master";
version = "1.10.0";
src = fetchFromGitHub {
owner = "kennytm";
repo = "rustup-toolchain-install-master";
tag = "v${finalAttrs.version}";
hash = "sha256-F2lMUNl+ZQTTaSpzzeIl6ijXou7J6tbPz6eQY9703qU=";
};
cargoHash = "sha256-yEIkiOn8FTyfoTBFdbdJAfolgai8VFnnwSl/a8vDqbY=";
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 = [
openssl
xz
];
meta = {
description = "Install a rustc master toolchain usable from rustup";
mainProgram = "rustup-toolchain-install-master";
homepage = "https://github.com/kennytm/rustup-toolchain-install-master";
license = lib.licenses.mit;
maintainers = [ ];
};
})