mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
017aa88470
- AMD GPU packages: AMD removed support for the RX5x0 GPUs from ROCm, so I cannot test these packages anymore. - A small number of GUI packages: I switched back to macOS on the desktop for work reasons, so I cannot easily test these. - broot: I took over maintainership from someone else, but do not really use broot.
91 lines
1.8 KiB
Nix
91 lines
1.8 KiB
Nix
{ stdenv
|
|
, lib
|
|
, fetchRepoProject
|
|
, cmake
|
|
, ninja
|
|
, patchelf
|
|
, perl
|
|
, pkg-config
|
|
, python3
|
|
, expat
|
|
, libdrm
|
|
, ncurses
|
|
, openssl
|
|
, wayland
|
|
, xorg
|
|
, zlib
|
|
}:
|
|
let
|
|
|
|
suffix = if stdenv.system == "x86_64-linux" then "64" else "32";
|
|
|
|
in stdenv.mkDerivation rec {
|
|
pname = "amdvlk";
|
|
version = "2021.Q2.5";
|
|
|
|
src = fetchRepoProject {
|
|
name = "${pname}-src";
|
|
manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
|
|
rev = "refs/tags/v-${version}";
|
|
sha256 = "0NJoGk++SHt4dtoUj3UQeW4zFtwa7osczUr+vxi8DG8=";
|
|
};
|
|
|
|
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
|
|
pkg-config
|
|
python3
|
|
];
|
|
|
|
rpath = lib.makeLibraryPath [
|
|
libdrm
|
|
openssl
|
|
stdenv.cc.cc.lib
|
|
xorg.libX11
|
|
xorg.libxcb
|
|
xorg.libxshmfence
|
|
];
|
|
|
|
cmakeDir = "../drivers/xgl";
|
|
|
|
# LTO is disabled in gcc for i686 as of #66528
|
|
cmakeFlags = lib.optionals stdenv.is32bit ["-DXGL_ENABLE_LTO=OFF"];
|
|
|
|
installPhase = ''
|
|
install -Dm755 -t $out/lib icd/amdvlk${suffix}.so
|
|
install -Dm644 -t $out/share/vulkan/icd.d icd/amd_icd${suffix}.json
|
|
install -Dm644 -t $out/share/vulkan/implicit_layer.d icd/amd_icd${suffix}.json
|
|
|
|
patchelf --set-rpath "$rpath" $out/lib/amdvlk${suffix}.so
|
|
'';
|
|
|
|
# Keep the rpath, otherwise vulkaninfo and vkcube segfault
|
|
dontPatchELF = true;
|
|
|
|
meta = with lib; {
|
|
description = "AMD Open Source Driver For Vulkan";
|
|
homepage = "https://github.com/GPUOpen-Drivers/AMDVLK";
|
|
changelog = "https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-${version}";
|
|
license = licenses.mit;
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
maintainers = with maintainers; [ Flakebi ];
|
|
};
|
|
}
|