10 rustPlatform.buildRustPackage {
12 version = "unstable-2023-12-18";
13 src = fetchFromGitHub {
16 rev = "e38231ffa51b84a2ca53b4b0439d1ca5e0dea32a";
17 hash = "sha256-UKEoOm+Jc0YUwO74Tn038MLeX/c3d2z8I0cTBVfX61U=";
20 lockFile = ./Cargo.lock;
22 "inkwell-0.2.0" = "sha256-eMoclRtekg8v+m5KsTcjB3zCdPkcJy42NALEEuT/fw8=";
27 https://crates.io/crates/llvm-sys#llvm-compatibility
28 llvm-sys requires a specific version of llvmPackages,
29 that is not the same as the one included by default with rustPlatform.
31 nativeBuildInputs = [ llvmPackages_16.llvm ];
32 buildInputs = [ libffi libxml2 ncurses ];
35 substituteInPlace tests/golden_tests.rs --replace \
36 'target/debug' "target/$(rustc -vV | sed -n 's|host: ||p')/release"
40 major = lib.versions.major llvmPackages_16.llvm.version;
41 minor = lib.versions.minor llvmPackages_16.llvm.version;
42 llvm-sys-ver = "${major}${builtins.substring 0 1 minor}";
45 # On some architectures llvm-sys is not using the package listed inside nativeBuildInputs
46 export LLVM_SYS_${llvm-sys-ver}_PREFIX=${llvmPackages_16.llvm.dev}
47 export ANTE_STDLIB_DIR=$out/lib
48 mkdir -p $ANTE_STDLIB_DIR
49 cp -r $src/stdlib/* $ANTE_STDLIB_DIR
53 homepage = "https://antelang.org/";
54 description = "Low-level functional language for exploring refinement types, lifetime inference, and algebraic effects";
56 license = with licenses; [ mit ];
57 maintainers = with maintainers; [ ehllie ];