From 9203338dacff1cc815194f70e80bc86dd59c52b8 Mon Sep 17 00:00:00 2001 From: Sreehari Anil Date: Thu, 17 Sep 2026 21:52:34 +0530 Subject: [PATCH] fix(flake): add llvm and set LIBCLANG_PATH --- flake.lock | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 6 ++++ 2 files changed, 88 insertions(+) create mode 100644 flake.lock diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..2febecc --- /dev/null +++ b/flake.lock @@ -0,0 +1,82 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1789370336, + "narHash": "sha256-6RSEDHIWQtesQKWSu5qRai8L2h4KgCgMEfJHstW99G4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c7def046b9a883d46974757852106483d741586f", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1789630063, + "narHash": "sha256-hulcXtNnQVDTPXiC8dQpTX3FPHxklIfX7Cx2kd2GDrM=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "a1d497a9415999853809ba22a7959b1c36dc6554", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 7e5f6ec..36d3993 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ overlays = [ (import rust-overlay) ]; pkgs = import nixpkgs { inherit system overlays; }; rustToolchain = pkgs.rust-bin.stable.latest.default; + llvmPackages = pkgs.llvmPackages; in { packages = { @@ -29,6 +30,7 @@ nativeBuildInputs = [ rustToolchain pkgs.pkg-config + llvmPackages.libclang ]; buildInputs = [ @@ -40,6 +42,8 @@ # Skip tests that require a Wayland compositor doCheck = false; + LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; + meta = with pkgs.lib; { description = "GPU-accelerated wallpaper engine for Wayland"; homepage = "https://github.com/programmersd21/wallr"; @@ -60,8 +64,10 @@ pkgs.rust-analyzer pkgs.clippy pkgs.rustfmt + llvmPackages.libclang ]; + LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library"; }; });