mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
vkquake: install a desktop file
This commit is contained in:
parent
d41d4be5c3
commit
fce0852e77
1 changed files with 28 additions and 8 deletions
|
@ -17,16 +17,17 @@
|
|||
stdenv,
|
||||
vulkan-headers,
|
||||
vulkan-loader,
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "vkquake";
|
||||
version = "1.31.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Novum";
|
||||
repo = "vkQuake";
|
||||
rev = version;
|
||||
tag = finalAttrs.version;
|
||||
sha256 = "sha256-VqTfcwt6/VTotD2Y7x7WiVwISRGOLfmMWh6EO5DSMX4=";
|
||||
};
|
||||
|
||||
|
@ -36,6 +37,7 @@ stdenv.mkDerivation rec {
|
|||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
copyDesktopItems
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
|
@ -64,18 +66,36 @@ stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out/bin"
|
||||
cp vkquake "$out/bin"
|
||||
|
||||
install -D ../Misc/vkQuake_256.png "$out/share/icons/hicolor/256x256/apps/vkquake.png"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
exec = finalAttrs.meta.mainProgram;
|
||||
name = "vkquake";
|
||||
icon = "vkquake";
|
||||
comment = finalAttrs.meta.description;
|
||||
desktopName = "vkQuake";
|
||||
categories = [ "Game" ];
|
||||
})
|
||||
];
|
||||
|
||||
postFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
||||
patchelf $out/bin/vkquake \
|
||||
--add-rpath ${lib.makeLibraryPath [ vulkan-loader ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Vulkan Quake port based on QuakeSpasm";
|
||||
homepage = src.meta.homepage;
|
||||
homepage = "https://github.com/Novum/vkQuake";
|
||||
changelog = "https://github.com/Novum/vkQuake/releases";
|
||||
longDescription = ''
|
||||
vkQuake is a Quake 1 port using Vulkan instead of OpenGL for rendering.
|
||||
It is based on the popular QuakeSpasm port and runs all mods compatible with it
|
||||
|
@ -85,11 +105,11 @@ stdenv.mkDerivation rec {
|
|||
specialization constants, CPU/GPU parallelism and memory pooling.
|
||||
'';
|
||||
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
maintainers = with maintainers; [
|
||||
platforms = with lib.platforms; linux ++ darwin;
|
||||
maintainers = with lib.maintainers; [
|
||||
PopeRigby
|
||||
ylh
|
||||
];
|
||||
mainProgram = "vkquake";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue