aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authornic-gaffney <gaffney_nic@protonmail.com>2023-07-31 00:08:04 -0500
committernic-gaffney <gaffney_nic@protonmail.com>2023-07-31 00:08:04 -0500
commit7275a607d45d7e4f206f005584eef9ea5e331044 (patch)
tree1dc6d8ad482ed85787feccebbdbbb1aaf54bb98c /flake.nix
parent9b2fe27e03ae1962305f9032823e9984b2cf503c (diff)
parent7cd943581febdf20f4f0590907cfc05986453f53 (diff)
downloadsloth-7275a607d45d7e4f206f005584eef9ea5e331044.tar.gz
Merge branch 'master' of github.com-Nic:slothlang/sloth
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix29
1 files changed, 18 insertions, 11 deletions
diff --git a/flake.nix b/flake.nix
index 5c82957..a4f64b4 100644
--- a/flake.nix
+++ b/flake.nix
@@ -27,27 +27,39 @@
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 = ./.;
- # FIXME: Tests do not run in release mode
- checkType = "debug";
cargoLock = {
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 +69,11 @@
cargo-deny
cargo-release
- pkg-config
-
- # Packages required for LLVM
- llvmPackages_15.libllvm
- libffi
- libxml2
-
# C compiler for debugging
clang
];
+
+ RUST_BACKTRACE = 1;
};
}
);