Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Nix build to use LLVM 13 #660

Merged
merged 2 commits into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -242,7 +242,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
nixpkgs: ['unstable', '23.05']
nixpkgs: ['unstable', '24.05']
cuda: ['false', 'true']
steps:
- uses: actions/[email protected]
12 changes: 8 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ pkgs ? import <nixpkgs> { }, lib ? pkgs.lib
, fetchFromGitHub ? pkgs.fetchFromGitHub, ncurses ? pkgs.ncurses
, cmake ? pkgs.cmake, libxml2 ? pkgs.libxml2, symlinkJoin ? pkgs.symlinkJoin
, cudaPackages ? pkgs.cudaPackages, enableCUDA ? false }:
, cudaPackages ? pkgs.cudaPackages, enableCUDA ? false
, libpfm ? pkgs.libpfm }:

let

llvmPackages = pkgs.llvmPackages_11;
llvmPackages = pkgs.llvmPackages_13;
stdenv = llvmPackages.stdenv;
cuda = if cudaPackages ? cudatoolkit_11 then [
cudaPackages.cudatoolkit_11
@@ -48,7 +49,9 @@ in stdenv.mkDerivation rec {
src = ./.;

nativeBuildInputs = [ cmake ];
buildInputs = [ llvmMerged ncurses libxml2 ] ++ lib.optionals enableCUDA cuda;
buildInputs = [ llvmMerged ncurses libxml2 ]
++ lib.optionals enableCUDA cuda
++ lib.optional (!stdenv.isDarwin) libpfm;

cmakeFlags = [
"-DHAS_TERRA_VERSION=0"
@@ -89,7 +92,8 @@ in stdenv.mkDerivation rec {
meta = with lib; {
description = "A low-level counterpart to Lua";
homepage = "http://terralang.org/";
platforms = platforms.x86_64 ++ platforms.aarch64;
# Note: Nix has removed LLVM 11, required for Linux AArch64
platforms = platforms.x86_64 ++ platforms.darwin; # ++ platforms.aarch64;
maintainers = with maintainers; [ jb55 thoughtpolice ];
license = licenses.mit;
};
Loading