diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index bf10181b1ade..012889bb2e82 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -138,3 +138,6 @@ acd0e3898feb321cb9a71a0fd376f1157d0f4553 # azure-cli: move to by-name, nixfmt #325950 96cd538b68bd1d0a0a37979356d669abbba32ebc + +# poptracker: format with nixfmt-rfc-style (#326697) +ff5c8f6cc3d1f2e017e86d50965c14b71f00567b diff --git a/pkgs/by-name/po/poptracker/package.nix b/pkgs/by-name/po/poptracker/package.nix index a7fa3d02a4b6..efb1a1fcf5f5 100644 --- a/pkgs/by-name/po/poptracker/package.nix +++ b/pkgs/by-name/po/poptracker/package.nix @@ -10,6 +10,8 @@ which, libsForQt5, makeWrapper, + makeDesktopItem, + copyDesktopItems, }: stdenv.mkDerivation (finalAttrs: { @@ -27,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./assets-path.diff ]; postPatch = '' - substituteInPlace src/poptracker.cpp --replace "@assets@" "$out/share/$pname/" + substituteInPlace src/poptracker.cpp --replace "@assets@" "$out/share/poptracker/" ''; enableParallelBuilding = true; @@ -35,6 +37,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ util-linux makeWrapper + copyDesktopItems ]; buildInputs = [ @@ -53,16 +56,33 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall install -m555 -Dt $out/bin build/linux-x86_64/poptracker - install -m444 -Dt $out/share/${finalAttrs.pname} assets/* + install -m444 -Dt $out/share/poptracker assets/* wrapProgram $out/bin/poptracker --prefix PATH : ${ lib.makeBinPath [ which libsForQt5.kdialog ] } + mkdir -p $out/share/icons/hicolor/{64x64,512x512}/apps + ln -s $out/share/poptracker/icon.png $out/share/icons/hicolor/64x64/apps/poptracker.png + ln -s $out/share/poptracker/icon512.png $out/share/icons/hicolor/512x512/apps/poptracker.png runHook postInstall ''; + desktopItems = [ + (makeDesktopItem { + name = "poptracker"; + desktopName = "PopTracker"; + exec = "poptracker"; + comment = "Universal, scriptable randomizer tracking solution"; + icon = "poptracker"; + categories = [ + "Game" + "Utility" + ]; + }) + ]; + meta = { description = "Scriptable tracker for randomized games"; longDescription = ''