shells/rust{,9x}: init

This commit is contained in:
Artemis Tosini 2024-08-27 20:01:40 +00:00
parent e0532f383e
commit 81a0d5ea57
Signed by: artemist
GPG key ID: EE5227935FE3FF18
3 changed files with 96 additions and 0 deletions

View file

@ -40,6 +40,8 @@
devShells = forAllSystems (pkgs: { devShells = forAllSystems (pkgs: {
armTrustedFirmware = pkgs.callPackage ./shells/armTrustedFirmware { }; armTrustedFirmware = pkgs.callPackage ./shells/armTrustedFirmware { };
plotter = pkgs.callPackage ./shells/plotter { }; plotter = pkgs.callPackage ./shells/plotter { };
rust = pkgs.callPackage ./shells/rust { };
rust9x = pkgs.callPackage ./shells/rust9x { };
ryujinx = pkgs.callPackage ./shells/ryujinx { }; ryujinx = pkgs.callPackage ./shells/ryujinx { };
uboot = pkgs.callPackage ./shells/uboot { }; uboot = pkgs.callPackage ./shells/uboot { };
zephyr = pkgs.callPackage ./shells/zephyr { }; zephyr = pkgs.callPackage ./shells/zephyr { };

46
shells/rust/default.nix Normal file
View file

@ -0,0 +1,46 @@
{
binutils,
cacert,
cmake,
curl,
git,
glibc,
lib,
mkShell,
ninja,
nix,
openssl,
patchelf,
pkg-config,
python3,
rustup,
stdenv,
}:
mkShell {
name = "rustc-dev";
nativeBuildInputs = [
binutils
cacert
cmake
curl
git
ninja
nix
patchelf
pkg-config
python3
rustup
];
buildInputs = [
glibc.out
glibc.static
openssl
];
# Avoid creating text files for ICEs.
RUSTC_ICE = "0";
# Provide `libstdc++.so.6` for the self-contained lld.
LD_LIBRARY_PATH = "${lib.makeLibraryPath [
stdenv.cc.cc.lib
]}";
}

48
shells/rust9x/default.nix Normal file
View file

@ -0,0 +1,48 @@
{
binutils,
cacert,
cargo-xwin,
clangStdenv,
cmake,
curl,
git,
glibc,
lib,
mkShell,
ninja,
nix,
openssl,
patchelf,
pkg-config,
python3,
rustup,
}:
(mkShell.override { stdenv = clangStdenv; }) {
name = "rustc-win9x-dev";
nativeBuildInputs = [
binutils
cacert
cargo-xwin
cmake
curl
git
ninja
nix
patchelf
pkg-config
python3
rustup
];
buildInputs = [
glibc.out
glibc.static
openssl
];
# Avoid creating text files for ICEs.
RUSTC_ICE = "0";
# Provide `libstdc++.so.6` for the self-contained lld.
LD_LIBRARY_PATH = "${lib.makeLibraryPath [
clangStdenv.cc.cc.lib
]}";
}