From 108dea5cdacd5f8fb221f051c06f7078aa8a3b49 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Sat, 21 May 2022 19:10:40 -0700 Subject: [PATCH] vkdisplayinfo: init at 0.1 https://github.com/ChristophHaag/vkdisplayinfo Apply suggestions from @SuperSandro2000's code review Co-authored-by: Sandro Don't use pipefail --- pkgs/tools/graphics/vkdisplayinfo/default.nix | 48 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/tools/graphics/vkdisplayinfo/default.nix diff --git a/pkgs/tools/graphics/vkdisplayinfo/default.nix b/pkgs/tools/graphics/vkdisplayinfo/default.nix new file mode 100644 index 000000000000..a48c4d1154fe --- /dev/null +++ b/pkgs/tools/graphics/vkdisplayinfo/default.nix @@ -0,0 +1,48 @@ +{ 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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b30eeac305d6..e1bcf2f1252f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20975,6 +20975,8 @@ with pkgs; hdf5 = hdf5.override { usev110Api = true; }; }; + vkdisplayinfo = callPackage ../tools/graphics/vkdisplayinfo { }; + vlock = callPackage ../misc/screensavers/vlock { }; vmime = callPackage ../development/libraries/vmime { };