amdvlk: cleanup

format with nixfmt-rfc-style
move to finalAttrs from recursion
This commit is contained in:
John Titor 2024-08-17 22:08:02 +05:30
parent e93da03aa4
commit 71de7c7e2b
No known key found for this signature in database
GPG Key ID: 29B0514F4E3C1CC0

View File

@ -1,56 +1,62 @@
{ stdenv
, callPackage
, lib
, fetchRepoProject
, writeScript
, cmake
, directx-shader-compiler
, glslang
, ninja
, patchelf
, perl
, pkg-config
, python3
, expat
, libdrm
, ncurses
, openssl
, wayland
, xorg
, zlib
{
stdenv,
callPackage,
lib,
fetchRepoProject,
writeScript,
cmake,
directx-shader-compiler,
glslang,
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 {
in
stdenv.mkDerivation (finalAttrs: {
pname = "amdvlk";
version = "2024.Q3.1";
src = fetchRepoProject {
name = "${pname}-src";
name = "amdvlk-src";
manifest = "https://github.com/GPUOpen-Drivers/AMDVLK.git";
rev = "refs/tags/v-${version}";
rev = "refs/tags/v-${finalAttrs.version}";
sha256 = "IZYv9ZfpIllYUhJ3f7AOFmSl7OfWWY8doaG8pe3GE+4=";
};
buildInputs = [
buildInputs =
[
expat
libdrm
ncurses
openssl
wayland
xorg.libX11
xorg.libxcb
xorg.xcbproto
xorg.libXext
xorg.libXrandr
xorg.libXft
xorg.libxshmfence
zlib
];
]
++ (with xorg; [
libX11
libxcb
xcbproto
libXext
libXrandr
libXft
libxshmfence
]);
nativeBuildInputs = [
nativeBuildInputs =
[
cmake
directx-shader-compiler
glslang
@ -59,20 +65,25 @@ in stdenv.mkDerivation rec {
perl
pkg-config
python3
] ++ (with python3.pkgs; [
]
++ (with python3.pkgs; [
jinja2
ruamel-yaml
]);
rpath = lib.makeLibraryPath [
rpath = lib.makeLibraryPath (
[
libdrm
openssl
stdenv.cc.cc.lib
xorg.libX11
xorg.libxcb
xorg.libxshmfence
zlib
];
]
++ (with xorg; [
libX11
libxcb
libxshmfence
])
);
cmakeDir = "../drivers/xgl";
@ -107,14 +118,19 @@ in stdenv.mkDerivation rec {
setHash "$hash"
'';
passthru.impureTests = { amdvlk = callPackage ./test.nix {}; };
passthru.impureTests = {
amdvlk = callPackage ./test.nix { };
};
meta = with lib; {
meta = {
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 ];
changelog = "https://github.com/GPUOpen-Drivers/AMDVLK/releases/tag/v-${finalAttrs.version}";
license = lib.licenses.mit;
platforms = [
"x86_64-linux"
"i686-linux"
];
maintainers = with lib.maintainers; [ Flakebi ];
};
}
})