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

Simplify LLVM dependency in shell.nix #14590

Merged
Changes from 1 commit
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
46 changes: 4 additions & 42 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ let
};

pkgs = if musl then nixpkgs.pkgsMusl else nixpkgs;
llvmPackages = pkgs."llvmPackages_${toString llvm}";

genericBinary = { url, sha256 }:
pkgs.stdenv.mkDerivation rec {
Expand Down Expand Up @@ -69,45 +70,6 @@ let

pkgconfig = pkgs.pkgconfig;

llvm_suite = ({
llvm_16 = {
llvm = pkgs.llvm_16;
extra = [ pkgs.llvmPackages_16.bintools pkgs.lldb_16 ];
};
llvm_15 = {
llvm = pkgs.llvm_15;
extra = [ pkgs.llvmPackages_15.bintools pkgs.lldb_15 ];
};
llvm_14 = {
llvm = pkgs.llvm_14;
extra = [ pkgs.llvmPackages_14.bintools pkgs.lldb_14 ];
};
llvm_13 = {
llvm = pkgs.llvm_13;
extra = [ pkgs.llvmPackages_13.bintools pkgs.lldb_13 ];
};
llvm_12 = {
llvm = pkgs.llvm_12;
extra = [ pkgs.llvmPackages_12.bintools pkgs.lldb_12 ];
};
llvm_11 = {
llvm = pkgs.llvm_11;
extra = [ pkgs.llvmPackages_11.bintools pkgs.lldb_11 ];
};
llvm_10 = {
llvm = pkgs.llvm_10;
extra = [ pkgs.llvmPackages_10.bintools ]; # lldb marked as broken
};
llvm_9 = {
llvm = pkgs.llvm_9;
extra = [ pkgs.llvmPackages_9.bintools ]; # lldb marked as broken
};
llvm_8 = {
llvm = pkgs.llvm_8;
extra = [ pkgs.llvmPackages_8.bintools ]; # lldb marked as broken
};
}."llvm_${toString llvm}");

boehmgc = pkgs.stdenv.mkDerivation rec {
pname = "boehm-gc";
version = "8.2.4";
Expand All @@ -131,7 +93,7 @@ let
boehmgc gmp libevent libiconv libxml2 libyaml openssl pcre2 zlib
] ++ lib.optionals stdenv.isDarwin [ libiconv ];

tools = [ pkgs.hostname pkgs.git llvm_suite.extra ];
tools = [ pkgs.hostname pkgs.git llvmPackages.bintools ] ++ pkgs.lib.optional llvmPackages.lldb.meta.broken llvmPackages.lldb;
in

pkgs.stdenv.mkDerivation rec {
Expand All @@ -140,11 +102,11 @@ pkgs.stdenv.mkDerivation rec {
buildInputs = tools ++ stdLibDeps ++ [
latestCrystalBinary
pkgconfig
llvm_suite.llvm
llvmPackages.libllvm
pkgs.libffi
];

LLVM_CONFIG = "${llvm_suite.llvm.dev}/bin/llvm-config";
LLVM_CONFIG = "${llvmPackages.libllvm.dev}/bin/llvm-config";

MACOSX_DEPLOYMENT_TARGET = "10.11";
}
Loading