nix-esp-rust/clang.nix

35 lines
895 B
Nix
Raw Normal View History

2024-09-15 21:15:56 +02:00
{pkgs ? import <nixpkgs> {}}:
pkgs.stdenv.mkDerivation rec {
pname = "esp-clang";
version = "18.1.2_20240912";
srcs = [
(builtins.fetchurl
{
url = "https://github.com/espressif/llvm-project/releases/download/esp-${version}/clang-esp-${version}-x86_64-linux-gnu.tar.xz";
sha256 = "0k8c596y7nsnyjf1yw54cayhsh6w45v023q7m339w3s40a75pqdf";
})
(builtins.fetchurl
{
url = "https://github.com/espressif/llvm-project/releases/download/esp-${version}/libs-clang-esp-${version}-x86_64-linux-gnu.tar.xz";
sha256 = "1i85rm77wzzpijclrzqdd0zb94dnw383gfxxwzim2dkd3nsgrmng";
})
];
preferLocalBuild = true;
nativeBuildInputs = with pkgs; [
autoPatchelfHook
];
buildInputs = with pkgs; [
stdenv.cc.cc.lib
libz
libxml2
];
installPhase = ''
mkdir -p "$out"
cp -R ./{bin,share,lib,include} "$out"
'';
}