8 directx-shader-compiler,
25 suffix = if stdenv.system == "x86_64-linux" then "64" else "32";
26 # Fix https://github.com/NixOS/nixpkgs/issues/348903 until the glslang update to 15.0.0 is merged into master
27 glslang_fixed = glslang.overrideAttrs (finalAttrs: oldAttrs: { cmakeFlags = [ ]; });
30 stdenv.mkDerivation (finalAttrs: {
32 version = "2024.Q3.3";
34 src = fetchRepoProject {
36 manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
37 rev = "refs/tags/v-${finalAttrs.version}";
38 hash = "sha256-wIPubMsSaNGTykD/K0gxdba128TqW5nu4CjXoLkprc0=";
63 directx-shader-compiler
71 ++ (with python3.pkgs; [
76 rpath = lib.makeLibraryPath (
90 cmakeDir = "../drivers/xgl";
95 install -Dm755 -t $out/lib icd/amdvlk${suffix}.so
96 install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json
97 install -Dm644 -t $out/share/vulkan/implicit_layer.d icd/amd_icd${suffix}.json
99 patchelf --set-rpath "$rpath" $out/lib/amdvlk${suffix}.so
104 # Keep the rpath, otherwise vulkaninfo and vkcube segfault
107 passthru.updateScript = writeScript "update.sh" ''
108 #!/usr/bin/env nix-shell
109 #!nix-shell -i bash -p coreutils curl gnused jq common-updater-scripts
111 packagePath="pkgs/by-name/am/amdvlk/package.nix"
114 sed -i $packagePath -e 's,sha256 = "[^'"'"'"]*",sha256 = "'"$1"'",'
117 version="$(curl -sL "https://api.github.com/repos/GPUOpen-Drivers/AMDVLK/releases?per_page=1" | jq '.[0].tag_name | split("-") | .[1]' --raw-output)"
118 sed -i $packagePath -e 's/version = "[^'"'"'"]*"/version = "'"$version"'"/'
120 setHash "$(nix-instantiate --eval -A lib.fakeSha256 | xargs echo)"
121 hash="$(nix to-base64 $(nix-build -A amdvlk 2>&1 | tail -n3 | grep 'got:' | cut -d: -f2- | xargs echo || true))"
125 passthru.impureTests = {
126 amdvlk = callPackage ./test.nix { };
130 description = "AMD Open Source Driver For Vulkan";
131 homepage = "https://github.com/GPUOpen-Drivers/AMDVLK";
132 changelog = "https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-${finalAttrs.version}";
133 license = lib.licenses.mit;
138 maintainers = with lib.maintainers; [ Flakebi ];