diff options
| author | Cody <cody@codyq.dev> | 2023-07-28 01:37:31 -0500 |
|---|---|---|
| committer | Cody <cody@codyq.dev> | 2023-07-28 01:37:31 -0500 |
| commit | 1555738be40d8fceb1d5888ba47c3bac84f5d2c1 (patch) | |
| tree | 51fba7945698783cb1ab2d86607c768f7597018b /flake.nix | |
| parent | 60ed283bace6596405eebd5670ce195f4c4f4409 (diff) | |
| download | sloth-1555738be40d8fceb1d5888ba47c3bac84f5d2c1.tar.gz | |
Fixed issues with building Sloth
- Made Sloth build with Rust stable again
- Made a rust-toolchain file so everyone uses the same version of Rust
- Fixed the GitHub Actions to have LLVM so it can actually build
- Fixed the Nix package to have LLVM so it can actually build
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 27 |
1 files changed, 18 insertions, 9 deletions
@@ -27,9 +27,17 @@ rustc = rustStable; }; in + let + baseNativeBuildInputs = with pkgs; [ pkg-config ]; + baseBuildInputs = with pkgs; [ + llvmPackages_15.libllvm + libffi + libxml2 + ]; + in with pkgs; { - packages.default = rustPlatform.buildRustPackage rec { + packages.default = rustPlatform.buildRustPackage { pname = "sloth"; version = "0.1.0"; src = ./.; @@ -40,14 +48,20 @@ lockFile = ./Cargo.lock; }; + nativeBuildInputs = baseNativeBuildInputs; + buildInputs = baseBuildInputs; + meta = with lib; { description = "The Sloth programming language"; homepage = "https://slothlang.tech"; license = with licenses; [ mit asl20 ]; }; + + LLVM_SYS_150_PREFIX = "${llvmPackages_15.libllvm.dev}"; }; devShells.default = mkShell { - buildInputs = [ + nativeBuildInputs = baseNativeBuildInputs; + buildInputs = baseBuildInputs ++ [ (rustNightly.override { extensions = [ "rust-src" "rust-analyzer" ]; targets = [ "wasm32-unknown-unknown" ]; @@ -57,16 +71,11 @@ cargo-deny cargo-release - pkg-config - - # Packages required for LLVM - llvmPackages_15.libllvm - libffi - libxml2 - # C compiler for debugging clang ]; + + RUST_BACKTRACE = 1; }; } ); |
