Skip to content

Commit

Permalink
✨ Overrided vkquake by creating a new package called my-vkquake
Browse files Browse the repository at this point in the history
  • Loading branch information
theobori committed Nov 22, 2024
1 parent e6b984d commit 55f2652
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 19 deletions.
37 changes: 19 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion modules/home/games/vkquake/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ in
enable = mkBoolOpt false "Enable vkquake.";
};

config = mkIf cfg.enable { home.packages = with pkgs; [ vkquake ]; };
config = mkIf cfg.enable { home.packages = [ pkgs.${namespace}.vkquake ]; };
}
34 changes: 34 additions & 0 deletions packages/vkquake/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
vkquake,
makeDesktopItem,
copyDesktopItems,
...
}:
vkquake.overrideAttrs (
_final: prev: {
nativeBuildInputs = prev.nativeBuildInputs ++ [ copyDesktopItems ];

installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
cp vkquake "$out/bin"
mkdir -p $out/share/icons/hicolor/256x256/apps
cp ../Misc/vkQuake_256.png $out/share/icons/hicolor/256x256/apps/vkquake.png
runHook postInstall
'';

desktopItems = [
(makeDesktopItem {
exec = prev.meta.mainProgram;
name = "vkquake";
icon = "vkquake";
comment = prev.meta.description;
desktopName = "vkQuake";
categories = [ "Game" ];
})
];
}
)

0 comments on commit 55f2652

Please sign in to comment.