Loading pkgs/build-support/rust/build-rust-package/default.nix +2 −15 Original line number Diff line number Diff line Loading @@ -151,23 +151,10 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg strictDeps = true; meta = meta // { badPlatforms = meta.badPlatforms or [] ++ [ # Rust is currently unable to target the n32 ABI lib.systems.inspect.patterns.isMips64n32 ]; } // lib.optionalAttrs (rustc.meta ? platforms) { badPlatforms = meta.badPlatforms or [] ++ rustc.badTargetPlatforms; # default to Rust's platforms platforms = lib.intersectLists meta.platforms or lib.platforms.all (rustc.meta.platforms ++ [ # Platforms without host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "armv7a-darwin" "armv5tel-linux" "armv7a-linux" "m68k-linux" "mips-linux" "mips64-linux" "mipsel-linux" "mips64el-linux" "riscv32-linux" "armv6l-netbsd" "mipsel-netbsd" "riscv64-netbsd" "x86_64-redox" "wasm32-wasi" ]); rustc.targetPlatforms; }; }) pkgs/build-support/rust/rustc-wrapper/default.nix +3 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ runCommand "${rustc-unwrapped.pname}-wrapper-${rustc-unwrapped.version}" { }; passthru = { inherit (rustc-unwrapped) pname version src llvm llvmPackages; inherit (rustc-unwrapped) pname version src llvm llvmPackages tier1TargetPlatforms targetPlatforms badTargetPlatforms; unwrapped = rustc-unwrapped; }; Loading pkgs/development/compilers/rust/binary.nix +31 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,37 @@ rec { dontStrip = true; setupHooks = ./setup-hook.sh; passthru = rec { tier1TargetPlatforms = [ # Platforms with host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "x86_64-darwin" "i686-darwin" "aarch64-darwin" "i686-freebsd" "x86_64-freebsd" "x86_64-solaris" "aarch64-linux" "armv6l-linux" "armv7l-linux" "i686-linux" "loongarch64-linux" "powerpc64-linux" "powerpc64le-linux" "riscv64-linux" "s390x-linux" "x86_64-linux" "aarch64-netbsd" "armv7l-netbsd" "i686-netbsd" "powerpc-netbsd" "x86_64-netbsd" "i686-openbsd" "x86_64-openbsd" "i686-windows" "x86_64-windows" ]; targetPlatforms = tier1TargetPlatforms ++ [ # Platforms without host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "armv7a-darwin" "armv5tel-linux" "armv7a-linux" "m68k-linux" "mips-linux" "mips64-linux" "mipsel-linux" "mips64el-linux" "riscv32-linux" "armv6l-netbsd" "mipsel-netbsd" "riscv64-netbsd" "x86_64-redox" "wasm32-wasi" ]; badTargetPlatforms = [ # Rust is currently unable to target the n32 ABI lib.systems.inspect.patterns.isMips64n32 ]; }; }; rustc = wrapRustc rustc-unwrapped; Loading pkgs/development/compilers/rust/rustc.nix +5 −14 Original line number Diff line number Diff line Loading @@ -303,6 +303,7 @@ in stdenv.mkDerivation (finalAttrs: { passthru = { llvm = llvmShared; inherit llvmPackages; inherit (rustc) tier1TargetPlatforms targetPlatforms badTargetPlatforms; tests = { inherit fd ripgrep wezterm; } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit firefox thunderbird; }; Loading @@ -313,19 +314,9 @@ in stdenv.mkDerivation (finalAttrs: { description = "Safe, concurrent, practical language"; maintainers = with maintainers; [ havvy ] ++ teams.rust.members; license = [ licenses.mit licenses.asl20 ]; platforms = [ # Platforms with host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "x86_64-darwin" "i686-darwin" "aarch64-darwin" "i686-freebsd" "x86_64-freebsd" "x86_64-solaris" "aarch64-linux" "armv6l-linux" "armv7l-linux" "i686-linux" "loongarch64-linux" "powerpc64-linux" "powerpc64le-linux" "riscv64-linux" "s390x-linux" "x86_64-linux" "aarch64-netbsd" "armv7l-netbsd" "i686-netbsd" "powerpc-netbsd" "x86_64-netbsd" "i686-openbsd" "x86_64-openbsd" "i686-windows" "x86_64-windows" ]; platforms = rustc.tier1TargetPlatforms; # If rustc can't target a platform, we also can't build rustc for # that platform. badPlatforms = rustc.badTargetPlatforms; }; }) pkgs/development/libraries/gstreamer/core/default.nix +7 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,11 @@ , lib , Cocoa , CoreServices , rustc , testers , rustc , withRust ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) rustc.targetPlatforms && lib.all (p: !lib.meta.platformMatch stdenv.hostPlatform p) rustc.badTargetPlatforms , gobject-introspection , buildPackages , withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages Loading Loading @@ -63,11 +66,12 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper glib bash-completion rustc ] ++ lib.optionals stdenv.isLinux [ libcap # for setcap binary ] ++ lib.optionals withIntrospection [ gobject-introspection ] ++ lib.optionals withRust [ rustc ] ++ lib.optionals enableDocumentation [ hotdoc ]; Loading @@ -92,6 +96,7 @@ stdenv.mkDerivation (finalAttrs: { mesonFlags = [ "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those "-Dexamples=disabled" # requires many dependencies and probably not useful for our users (lib.mesonEnable "ptp-helper" withRust) (lib.mesonEnable "introspection" withIntrospection) (lib.mesonEnable "doc" enableDocumentation) (lib.mesonEnable "libunwind" withLibunwind) Loading Loading
pkgs/build-support/rust/build-rust-package/default.nix +2 −15 Original line number Diff line number Diff line Loading @@ -151,23 +151,10 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg strictDeps = true; meta = meta // { badPlatforms = meta.badPlatforms or [] ++ [ # Rust is currently unable to target the n32 ABI lib.systems.inspect.patterns.isMips64n32 ]; } // lib.optionalAttrs (rustc.meta ? platforms) { badPlatforms = meta.badPlatforms or [] ++ rustc.badTargetPlatforms; # default to Rust's platforms platforms = lib.intersectLists meta.platforms or lib.platforms.all (rustc.meta.platforms ++ [ # Platforms without host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "armv7a-darwin" "armv5tel-linux" "armv7a-linux" "m68k-linux" "mips-linux" "mips64-linux" "mipsel-linux" "mips64el-linux" "riscv32-linux" "armv6l-netbsd" "mipsel-netbsd" "riscv64-netbsd" "x86_64-redox" "wasm32-wasi" ]); rustc.targetPlatforms; }; })
pkgs/build-support/rust/rustc-wrapper/default.nix +3 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ runCommand "${rustc-unwrapped.pname}-wrapper-${rustc-unwrapped.version}" { }; passthru = { inherit (rustc-unwrapped) pname version src llvm llvmPackages; inherit (rustc-unwrapped) pname version src llvm llvmPackages tier1TargetPlatforms targetPlatforms badTargetPlatforms; unwrapped = rustc-unwrapped; }; Loading
pkgs/development/compilers/rust/binary.nix +31 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,37 @@ rec { dontStrip = true; setupHooks = ./setup-hook.sh; passthru = rec { tier1TargetPlatforms = [ # Platforms with host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "x86_64-darwin" "i686-darwin" "aarch64-darwin" "i686-freebsd" "x86_64-freebsd" "x86_64-solaris" "aarch64-linux" "armv6l-linux" "armv7l-linux" "i686-linux" "loongarch64-linux" "powerpc64-linux" "powerpc64le-linux" "riscv64-linux" "s390x-linux" "x86_64-linux" "aarch64-netbsd" "armv7l-netbsd" "i686-netbsd" "powerpc-netbsd" "x86_64-netbsd" "i686-openbsd" "x86_64-openbsd" "i686-windows" "x86_64-windows" ]; targetPlatforms = tier1TargetPlatforms ++ [ # Platforms without host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "armv7a-darwin" "armv5tel-linux" "armv7a-linux" "m68k-linux" "mips-linux" "mips64-linux" "mipsel-linux" "mips64el-linux" "riscv32-linux" "armv6l-netbsd" "mipsel-netbsd" "riscv64-netbsd" "x86_64-redox" "wasm32-wasi" ]; badTargetPlatforms = [ # Rust is currently unable to target the n32 ABI lib.systems.inspect.patterns.isMips64n32 ]; }; }; rustc = wrapRustc rustc-unwrapped; Loading
pkgs/development/compilers/rust/rustc.nix +5 −14 Original line number Diff line number Diff line Loading @@ -303,6 +303,7 @@ in stdenv.mkDerivation (finalAttrs: { passthru = { llvm = llvmShared; inherit llvmPackages; inherit (rustc) tier1TargetPlatforms targetPlatforms badTargetPlatforms; tests = { inherit fd ripgrep wezterm; } // lib.optionalAttrs stdenv.hostPlatform.isLinux { inherit firefox thunderbird; }; Loading @@ -313,19 +314,9 @@ in stdenv.mkDerivation (finalAttrs: { description = "Safe, concurrent, practical language"; maintainers = with maintainers; [ havvy ] ++ teams.rust.members; license = [ licenses.mit licenses.asl20 ]; platforms = [ # Platforms with host tools from # https://doc.rust-lang.org/nightly/rustc/platform-support.html "x86_64-darwin" "i686-darwin" "aarch64-darwin" "i686-freebsd" "x86_64-freebsd" "x86_64-solaris" "aarch64-linux" "armv6l-linux" "armv7l-linux" "i686-linux" "loongarch64-linux" "powerpc64-linux" "powerpc64le-linux" "riscv64-linux" "s390x-linux" "x86_64-linux" "aarch64-netbsd" "armv7l-netbsd" "i686-netbsd" "powerpc-netbsd" "x86_64-netbsd" "i686-openbsd" "x86_64-openbsd" "i686-windows" "x86_64-windows" ]; platforms = rustc.tier1TargetPlatforms; # If rustc can't target a platform, we also can't build rustc for # that platform. badPlatforms = rustc.badTargetPlatforms; }; })
pkgs/development/libraries/gstreamer/core/default.nix +7 −2 Original line number Diff line number Diff line Loading @@ -15,8 +15,11 @@ , lib , Cocoa , CoreServices , rustc , testers , rustc , withRust ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) rustc.targetPlatforms && lib.all (p: !lib.meta.platformMatch stdenv.hostPlatform p) rustc.badTargetPlatforms , gobject-introspection , buildPackages , withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages Loading Loading @@ -63,11 +66,12 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper glib bash-completion rustc ] ++ lib.optionals stdenv.isLinux [ libcap # for setcap binary ] ++ lib.optionals withIntrospection [ gobject-introspection ] ++ lib.optionals withRust [ rustc ] ++ lib.optionals enableDocumentation [ hotdoc ]; Loading @@ -92,6 +96,7 @@ stdenv.mkDerivation (finalAttrs: { mesonFlags = [ "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those "-Dexamples=disabled" # requires many dependencies and probably not useful for our users (lib.mesonEnable "ptp-helper" withRust) (lib.mesonEnable "introspection" withIntrospection) (lib.mesonEnable "doc" enableDocumentation) (lib.mesonEnable "libunwind" withLibunwind) Loading