From 9e0b1dcf1c342d4efbf46c17ef179ba884b3aa5e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 8 Feb 2024 19:10:26 +0100 Subject: [oxalica-toolchain-only] remove use of nixos rust toolchain --- nix/compile.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/nix/compile.nix b/nix/compile.nix index c51188fe..f13c4877 100644 --- a/nix/compile.nix +++ b/nix/compile.nix @@ -30,19 +30,9 @@ let In practise, rustOverlay ships rustc+cargo in a single derivation while NixOS ships them in separate ones. We reunite them with symlinkJoin. */ - toolchainOptions = if target == null || target == "x86_64-unknown-linux-musl" - || target == "aarch64-unknown-linux-musl" then { + toolchainOptions = { rustVersion = "1.73.0"; extraRustComponents = [ "clippy" ]; - } else { - rustToolchain = pkgs.symlinkJoin { - name = "rust-static-toolchain-${target}"; - paths = [ - pkgs.rustPlatform.rust.cargo - pkgs.rustPlatform.rust.rustc - # clippy not needed, it only runs on amd64 - ]; - }; }; buildEnv = (drv: -- cgit v1.2.3 From 57024a21290d6f29aac9d8df0fbe107663b3945e Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 8 Feb 2024 23:21:00 +0100 Subject: [oxalica-toolchain-only] remove custom toolchains from toolchains.nix --- nix/toolchain.nix | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/nix/toolchain.nix b/nix/toolchain.nix index 532db74e..c4fef9ab 100644 --- a/nix/toolchain.nix +++ b/nix/toolchain.nix @@ -3,29 +3,9 @@ with import ./common.nix; let - platforms = [ - #"x86_64-unknown-linux-musl" - "i686-unknown-linux-musl" - #"aarch64-unknown-linux-musl" - "armv6l-unknown-linux-musleabihf" - ]; - pkgsList = builtins.map (target: - import pkgsSrc { - inherit system; - crossSystem = { - config = target; - isStatic = true; - }; - overlays = [ cargo2nixOverlay ]; - }) platforms; pkgsHost = import pkgsSrc { }; - lib = pkgsHost.lib; kaniko = (import ./kaniko.nix) pkgsHost; winscp = (import ./winscp.nix) pkgsHost; manifestTool = (import ./manifest-tool.nix) pkgsHost; -in lib.flatten (builtins.map (pkgs: [ - pkgs.rustPlatform.rust.rustc - pkgs.rustPlatform.rust.cargo - pkgs.buildPackages.stdenv.cc -]) pkgsList) ++ [ kaniko winscp manifestTool ] +in [ kaniko winscp manifestTool ] -- cgit v1.2.3 From 8724aabdf5463c3baedff5bfbfa9e0f71510ef96 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 8 Feb 2024 23:23:27 +0100 Subject: [oxalica-toolchain-only] remove obsolete comment on toolchains --- nix/compile.nix | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/nix/compile.nix b/nix/compile.nix index f13c4877..1e712710 100644 --- a/nix/compile.nix +++ b/nix/compile.nix @@ -19,17 +19,6 @@ let overlays = [ cargo2nixOverlay ]; }; - /* Cargo2nix is built for rustOverlay which installs Rust from Mozilla releases. - This is fine for 64-bit platforms, but for 32-bit platforms, we need our own Rust - to avoid incompatibilities with time_t between different versions of musl - (>= 1.2.0 shipped by NixOS, < 1.2.0 with which rustc was built), which lead to compilation breakage. - So we want a Rust release that is bound to our Nix repository to avoid these problems. - See here for more info: https://musl.libc.org/time64.html - Because Cargo2nix does not support the Rust environment shipped by NixOS, - we emulate the structure of the Rust object created by rustOverlay. - In practise, rustOverlay ships rustc+cargo in a single derivation while - NixOS ships them in separate ones. We reunite them with symlinkJoin. - */ toolchainOptions = { rustVersion = "1.73.0"; extraRustComponents = [ "clippy" ]; -- cgit v1.2.3