nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 105 lines 4.5 kB view raw
1# New rust versions should first go to staging. 2# Things to check after updating: 3# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin: 4# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github 5# This testing can be also done by other volunteers as part of the pull 6# request review, in case platforms cannot be covered. 7# 2. The LLVM version used for building should match with rust upstream. 8# Check the version number in the src/llvm-project git submodule in: 9# https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules 10 11# Note: The way this is structured is: 12# 1. Import default.nix, and apply arguments as needed for the file-defined function 13# 2. Implicitly, all arguments to this file are applied to the function that is imported. 14# if you want to add an argument to default.nix's top-level function, but not the function 15# it instantiates, add it to the `removeAttrs` call below. 16{ 17 stdenv, 18 lib, 19 newScope, 20 callPackage, 21 pkgsBuildTarget, 22 pkgsBuildBuild, 23 pkgsBuildHost, 24 pkgsHostTarget, 25 pkgsTargetTarget, 26 makeRustPlatform, 27 wrapRustcWith, 28 llvmPackages, 29 llvm, 30 cargo-auditable, 31 wrapCCWith, 32 overrideCC, 33 fetchpatch, 34}@args: 35let 36 llvmSharedFor = 37 pkgSet: 38 pkgSet.llvmPackages.libllvm.override ( 39 { 40 enableSharedLibraries = true; 41 } 42 // lib.optionalAttrs (stdenv.targetPlatform.useLLVM or false) { 43 # Force LLVM to compile using clang + LLVM libs when targeting pkgsLLVM 44 stdenv = pkgSet.stdenv.override { 45 allowedRequisites = null; 46 cc = pkgSet.pkgsBuildHost.llvmPackages.clangUseLLVM; 47 }; 48 } 49 ); 50in 51import ./default.nix 52 { 53 rustcVersion = "1.93.0"; 54 rustcSha256 = "sha256-aREr2DwyGUP/w5C32y9Z7z/ruV2scA9nwhVvv2tQpwU="; 55 rustcPatches = [ ./ignore-missing-docs.patch ]; 56 57 llvmSharedForBuild = llvmSharedFor pkgsBuildBuild; 58 llvmSharedForHost = llvmSharedFor pkgsBuildHost; 59 llvmSharedForTarget = llvmSharedFor pkgsBuildTarget; 60 61 inherit llvmPackages cargo-auditable; 62 63 # For use at runtime 64 llvmShared = llvmSharedFor pkgsHostTarget; 65 66 # Note: the version MUST be the same version that we are building. Upstream 67 # ensures that each released compiler can compile itself: 68 # https://github.com/NixOS/nixpkgs/pull/351028#issuecomment-2438244363 69 bootstrapVersion = "1.93.0"; 70 71 # fetch hashes by running `print-hashes.sh ${bootstrapVersion}` 72 bootstrapHashes = { 73 i686-unknown-linux-gnu = "10036f92f7dbbef6519bd16c4b9ce3699071e8fa49c58b4b8204b69803c7cd54"; 74 x86_64-unknown-linux-gnu = "ca55df589f7cd68eec883086c5ff63ece04a1820e6d23e514fbb412cc8bf77a4"; 75 x86_64-unknown-linux-musl = "3cca6e0536fbb1f9ab17bf5f1ccc62aadbaa936f72326a8972698af10d40799b"; 76 arm-unknown-linux-gnueabihf = "8788045554de26e5858e64947989dd28ead702e6f3a0cba2855d65730183db18"; 77 armv7-unknown-linux-gnueabihf = "29a6871136f23545ea2d3f6c0258898440ca8fdca47be0ae7e2e3fcc8a482847"; 78 aarch64-unknown-linux-gnu = "091f981b95cbc6713ce6d6c23817286d4c10fd35fc76a990a3af430421751cfc"; 79 aarch64-unknown-linux-musl = "d8beb93a11bc84f131d66b3bcc964acf514371203b8ccb9121e942b9922f210f"; 80 x86_64-apple-darwin = "0297504189bdee029bacb61245cb131e3a2cc4bfd50c9e11281ea8957706e675"; 81 aarch64-apple-darwin = "e33cf237cfff8af75581fedece9f3c348e976bb8246078786f1888c3b251d380"; 82 powerpc64-unknown-linux-gnu = "d535af6a90d79b67a6e08b5fc4442285c3e330541516f4fec72d70f996b7f5b4"; 83 powerpc64le-unknown-linux-gnu = "dba9e9428e216cc781be25083f3f40eaca432c32fe399bfe4330c234f441a172"; 84 powerpc64le-unknown-linux-musl = "66213e58a4088eb7291ddebe4d44fffcc50d561e53b00e69a16773ec41de76d3"; 85 riscv64gc-unknown-linux-gnu = "c4214fa5b68eb15c37e1fd5bd205e5033e40e5a9a146f520c76dadd4cc316e3a"; 86 s390x-unknown-linux-gnu = "3afdc7d3e24895f3c852ceb7cb3fd080334015d1f5e9dc89e4cd4dc574819c2e"; 87 loongarch64-unknown-linux-gnu = "0e913233ced8c42fa162d36eabf5629a9ec6e918ef02ddedb79217d93b464a96"; 88 loongarch64-unknown-linux-musl = "65edcb0b6b4da21df2fb5a4d56c56806a0460bb91e702222006ca9eb1a06f498"; 89 x86_64-unknown-freebsd = "22660fb38447806d59f39c1a0105e2a9aadf0b2cc442349da9e7574edc1cc84f"; 90 }; 91 92 selectRustPackage = pkgs: pkgs.rust_1_93; 93 } 94 95 ( 96 removeAttrs args [ 97 "llvmPackages" 98 "llvm" 99 "wrapCCWith" 100 "overrideCC" 101 "pkgsHostTarget" 102 "fetchpatch" 103 "cargo-auditable" 104 ] 105 )