Merge pull request #82305 from Flakebi/amdvlk

amdvlk: init at 2020.Q2.5
This commit is contained in:
Daniël de Kok 2020-06-25 15:17:52 +02:00 committed by GitHub
commit 80b6b9b706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,85 @@
{ stdenv
, lib
, fetchpatch
, fetchRepoProject
, cmake
, ninja
, patchelf
, perl
, pkgconfig
, python3
, expat
, libdrm
, ncurses
, openssl
, wayland
, xorg
, zlib
}:
stdenv.mkDerivation rec {
pname = "amdvlk";
version = "2020.Q2.5";
src = fetchRepoProject {
name = "${pname}-src";
manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
rev = "refs/tags/v-${version}";
sha256 = "008adby8vx12ma155x64n7aj9vp9ygqgij3mm3q20i187db7d1ab";
};
buildInputs = [
expat
ncurses
openssl
wayland
xorg.libX11
xorg.libxcb
xorg.xcbproto
xorg.libXext
xorg.libXrandr
xorg.libXft
xorg.libxshmfence
zlib
];
nativeBuildInputs = [
cmake
ninja
patchelf
perl
pkgconfig
python3
];
rpath = lib.makeLibraryPath [
libdrm
stdenv.cc.cc.lib
xorg.libX11
xorg.libxcb
xorg.libxshmfence
];
cmakeDir = "../drivers/xgl";
installPhase = ''
install -Dm755 -t $out/lib icd/amdvlk64.so
install -Dm644 -t $out/share/vulkan/icd.d ../drivers/AMDVLK/json/Redhat/amd_icd64.json
substituteInPlace $out/share/vulkan/icd.d/amd_icd64.json --replace \
"/usr/lib64" "$out/lib"
patchelf --set-rpath "$rpath" $out/lib/amdvlk64.so
'';
# Keep the rpath, otherwise vulkaninfo and vkcube segfault
dontPatchELF = true;
meta = with stdenv.lib; {
description = "AMD Open Source Driver For Vulkan";
homepage = "https://github.com/GPUOpen-Drivers/AMDVLK";
license = licenses.mit;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ Flakebi ];
};
}

View File

@ -11265,6 +11265,8 @@ in
allegro4 = callPackage ../development/libraries/allegro {};
allegro5 = callPackage ../development/libraries/allegro/5.nix {};
amdvlk = callPackage ../development/libraries/amdvlk {};
amrnb = callPackage ../development/libraries/amrnb { };
amrwb = callPackage ../development/libraries/amrwb { };