nixpkgs/pkgs/by-name/gp/gpu-viewer/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

97 lines
1.8 KiB
Nix
Raw Normal View History

2024-10-04 21:50:17 +00:00
{
lib,
python3Packages,
2024-10-04 21:50:17 +00:00
fetchFromGitHub,
# nativeBuildInputs
gobject-introspection,
2024-10-04 21:50:17 +00:00
meson,
ninja,
pkg-config,
wrapGAppsHook4,
# buildInputs
gdk-pixbuf,
2024-10-04 21:50:17 +00:00
gtk4,
libadwaita,
vulkan-tools,
# wrapper
2024-10-04 21:50:17 +00:00
python3,
clinfo,
2024-10-04 21:50:17 +00:00
lsb-release,
mesa-demos,
vdpauinfo,
# passthru
nix-update-script,
2023-03-14 14:05:41 +00:00
}:
python3Packages.buildPythonApplication rec {
2023-03-14 14:05:41 +00:00
pname = "gpu-viewer";
version = "3.10";
pyproject = false;
2023-03-14 14:05:41 +00:00
src = fetchFromGitHub {
owner = "arunsivaramanneo";
repo = "gpu-viewer";
2024-01-18 13:28:19 +00:00
rev = "refs/tags/v${version}";
hash = "sha256-0rbg3T9OXnSZ5+2cjgfNitAv1LgdO0N90wWJifzHcsg=";
2023-03-14 14:05:41 +00:00
};
nativeBuildInputs = [
gobject-introspection
2023-03-14 14:05:41 +00:00
meson
ninja
pkg-config
wrapGAppsHook4
2023-03-14 14:05:41 +00:00
];
buildInputs = [
gdk-pixbuf
2023-03-14 14:05:41 +00:00
gtk4
libadwaita
vulkan-tools
];
pythonPath = with python3Packages; [
click
pygobject3
2023-03-14 14:05:41 +00:00
];
# Prevent double wrapping
dontWrapGApps = true;
postFixup = ''
makeWrapper ${python3.interpreter} $out/bin/gpu-viewer \
2024-10-04 21:50:17 +00:00
--prefix PATH : "${
lib.makeBinPath [
clinfo
lsb-release
mesa-demos
vdpauinfo
vulkan-tools
]
}" \
2023-03-14 14:05:41 +00:00
--add-flags "$out/share/gpu-viewer/Files/GPUViewer.py" \
--prefix PYTHONPATH : "$PYTHONPATH" \
--chdir "$out/share/gpu-viewer/Files" \
''${makeWrapperArgs[@]} \
''${gappsWrapperArgs[@]}
'';
passthru = {
updateScript = nix-update-script { };
};
meta = {
2023-03-14 14:05:41 +00:00
homepage = "https://github.com/arunsivaramanneo/GPU-Viewer";
description = "Front-end to glxinfo, vulkaninfo, clinfo and es2_info";
changelog = "https://github.com/arunsivaramanneo/GPU-Viewer/releases/tag/v${version}";
maintainers = with lib.maintainers; [ GaetanLepage ];
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
2024-02-11 02:19:15 +00:00
mainProgram = "gpu-viewer";
2023-03-14 14:05:41 +00:00
};
}