depot/third_party/nixpkgs/pkgs/tools/graphics/vkdisplayinfo/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

48 lines
1,015 B
Nix

{ lib
, stdenv
, meson
, ninja
, vulkan-loader
, vulkan-headers
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "vkdisplayinfo";
version = "0.1";
src = fetchFromGitHub {
owner = "ChristophHaag";
repo = "vkdisplayinfo";
rev = version;
hash = "sha256-n6U7T5aOYTpgWE2WGPBPHtQKzitf9PxAoXJNWyz4rYw=";
};
postInstall = ''
install vkdisplayinfo -Dm755 -t $out/bin
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
($out/bin/vkdisplayinfo 2>&1 || true) | grep -q vkdisplayinfo
runHook postInstallCheck
'';
nativeBuildInputs = [
meson
ninja
];
buildInputs = [
vulkan-loader
vulkan-headers
];
meta = with lib; {
description = "Print displays and modes enumerated with the Vulkan function vkGetPhysicalDeviceDisplayPropertiesKHR";
homepage = "https://github.com/ChristophHaag/vkdisplayinfo";
platforms = platforms.linux;
license = licenses.boost;
maintainers = [ maintainers.LunNova ];
};
}