From baf5010b3c35cfa92766c89784db076be905f18a Mon Sep 17 00:00:00 2001 From: Keenan Weaver Date: Wed, 28 Jun 2023 12:25:38 -0500 Subject: [PATCH] doomrunner: init at 1.7.2 doomrunner: fix case doomrunner: implement suggestions doomrunner: made suggested changes doomrunner: move desktopitem doomrunner: fix meta var --- pkgs/games/doom-ports/doomrunner/default.nix | 60 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 62 insertions(+) create mode 100644 pkgs/games/doom-ports/doomrunner/default.nix diff --git a/pkgs/games/doom-ports/doomrunner/default.nix b/pkgs/games/doom-ports/doomrunner/default.nix new file mode 100644 index 000000000000..17048d57630f --- /dev/null +++ b/pkgs/games/doom-ports/doomrunner/default.nix @@ -0,0 +1,60 @@ +{ lib +, stdenv +, qtbase +, qmake +, makeDesktopItem +, wrapQtAppsHook +, imagemagick +, fetchFromGitHub +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "doomrunner"; + version = "1.7.2"; + + src = fetchFromGitHub { + owner = "Youda008"; + repo = "DoomRunner"; + rev = "v${finalAttrs.version}"; + hash = "sha256-a+f1L7WKdSwMlmXvvIkN+CPvW7Wh0gr4WuXsYKotfPE="; + }; + + buildInputs = [ qtbase ]; + nativeBuildInputs = [ qmake wrapQtAppsHook imagemagick ]; + + makeFlags = [ + "INSTALL_ROOT=${placeholder "out"}" + ]; + + postInstall = '' + mkdir -p $out/{bin,share/applications} + install -Dm755 $out/usr/bin/DoomRunner $out/bin/DoomRunner + + for size in 16 24 32 48 64 128; do + mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps + convert -background none -resize "$size"x"$size" $PWD/Resources/DoomRunner.ico -flatten $out/share/icons/hicolor/"$size"x"$size"/apps/DoomRunner.png + done; + + install -m 444 -D "$desktopItem/share/applications/"* -t $out/share/applications/ + rm -rf $out/usr + ''; + + desktopItem = makeDesktopItem { + name = "DoomRunner"; + desktopName = "DoomRunner"; + comment = "Preset-oriented graphical launcher of ZDoom and derivatives"; + categories = [ "Game" ]; + icon = "DoomRunner"; + type = "Application"; + exec = "DoomRunner"; + }; + + meta = with lib; { + description = "Graphical launcher of ZDoom and derivatives"; + homepage = "https://github.com/Youda008/DoomRunner/"; + changelog = "https://github.com/Youda008/DoomRunner/blob/${finalAttrs.src.rev}/changelog.txt"; + license = licenses.gpl3Only; + platforms = platforms.linux; + maintainers = with maintainers; [ keenanweaver ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7581f2f2cda5..117cf1b9bc59 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36463,6 +36463,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Cocoa; }; + doomrunner = qt5.callPackage ../games/doom-ports/doomrunner { }; + chocolate-doom = callPackage ../games/doom-ports/chocolate-doom { }; crispy-doom = callPackage ../games/doom-ports/crispy-doom { };