Skip to content

Commit ee8448b

Browse files
committed
chore(vulkan): Add mesa to deps
1 parent 15ebfb7 commit ee8448b

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ plugins/applications/target
33
result
44
/result
55
/.direnv
6+
.envrc

nix/default.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
libXrandr,
1919
libXi,
2020
libXcursor,
21+
mesa,
22+
system,
2123
...
2224
}: let
2325
cargoToml = builtins.fromTOML (builtins.readFile ../oxirun/Cargo.toml);
@@ -28,6 +30,13 @@
2830
pkg-config
2931
libclang
3032
];
33+
driverIcdPath = "${mesa}/share/vulkan/icd.d";
34+
icdArch =
35+
if system == "x86_64-linux"
36+
then "x86_64"
37+
else if system == "aarch64-linux"
38+
then "aarch64"
39+
else "x86_64";
3140
in
3241
rustPlatform.buildRustPackage rec {
3342
pname = cargoToml.package.name;
@@ -67,6 +76,7 @@ in
6776
copyLibs = true;
6877
LD_LIBRARY_PATH = libPath;
6978
LIBCLANG_PATH = "${libclang.lib}/lib";
79+
VK_ICD_FILENAMES = "${driverIcdPath}/radeon_icd.${icdArch}.json:${driverIcdPath}/intel_icd.${icdArch}.json";
7080

7181
postFixup = let
7282
libPath = lib.makeLibraryPath [
@@ -80,6 +90,7 @@ in
8090
libXi
8191
libXcursor
8292
libclang
93+
mesa
8394
];
8495
in ''
8596
patchelf --set-rpath "${libPath}" "$out/bin/oxirun"

0 commit comments

Comments
 (0)