Skip to content

Commit b985e13

Browse files
Update Nix build to use LLVM 13 (terralang#660)
1 parent 4d32a10 commit b985e13

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ jobs:
242242
runs-on: ubuntu-latest
243243
strategy:
244244
matrix:
245-
nixpkgs: ['unstable', '23.05']
245+
nixpkgs: ['unstable', '24.05']
246246
cuda: ['false', 'true']
247247
steps:
248248
- uses: actions/checkout@v2.3.4

default.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{ pkgs ? import <nixpkgs> { }, lib ? pkgs.lib
22
, fetchFromGitHub ? pkgs.fetchFromGitHub, ncurses ? pkgs.ncurses
33
, cmake ? pkgs.cmake, libxml2 ? pkgs.libxml2, symlinkJoin ? pkgs.symlinkJoin
4-
, cudaPackages ? pkgs.cudaPackages, enableCUDA ? false }:
4+
, cudaPackages ? pkgs.cudaPackages, enableCUDA ? false
5+
, libpfm ? pkgs.libpfm }:
56

67
let
78

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

5051
nativeBuildInputs = [ cmake ];
51-
buildInputs = [ llvmMerged ncurses libxml2 ] ++ lib.optionals enableCUDA cuda;
52+
buildInputs = [ llvmMerged ncurses libxml2 ]
53+
++ lib.optionals enableCUDA cuda
54+
++ lib.optional (!stdenv.isDarwin) libpfm;
5255

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

0 commit comments

Comments
 (0)