Fix desktop file and move directories around
This commit is contained in:
parent
d68980810a
commit
8d000d29fa
@ -2,6 +2,6 @@
|
|||||||
description = "PolyMC";
|
description = "PolyMC";
|
||||||
|
|
||||||
outputs = inputs: {
|
outputs = inputs: {
|
||||||
overlay = import ./overlay.nix;
|
overlay = import ./packages/nix/overlay.nix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,7 @@
|
|||||||
{ lib, mkDerivation, makeDesktopItem, fetchFromGitHub, cmake, jdk8, jdk, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, libGL, msaClientID ? "" }:
|
{ lib, mkDerivation, fetchFromGitHub, cmake, jdk8, jdk, zlib, file, makeWrapper, xorg, libpulseaudio, qtbase, libGL, msaClientID ? "" }:
|
||||||
|
|
||||||
let
|
let
|
||||||
libpath = with xorg; lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio libGL ];
|
libpath = with xorg; lib.makeLibraryPath [ libX11 libXext libXcursor libXrandr libXxf86vm libpulseaudio libGL ];
|
||||||
desktopFile = makeDesktopItem {
|
|
||||||
name = "PolyMC";
|
|
||||||
desktopName = "PolyMC";
|
|
||||||
exec = "polymc";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "polymc";
|
pname = "polymc";
|
||||||
@ -34,11 +29,11 @@ mkDerivation rec {
|
|||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||||
rm $out/share/applications/*
|
|
||||||
cp ${desktopFile}/share/applications/* $out/share/applications/
|
|
||||||
wrapProgram $out/bin/polymc \
|
wrapProgram $out/bin/polymc \
|
||||||
--set GAME_LIBRARY_PATH /run/opengl-driver/lib:${libpath} \
|
--set GAME_LIBRARY_PATH /run/opengl-driver/lib:${libpath} \
|
||||||
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
||||||
|
|
||||||
|
substituteInPlace $out/share/applications/org.polymc.PolyMC.desktop --replace 'Exec=' 'Exec=${placeholder "out"}/bin/polymc'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
Loading…
Reference in New Issue
Block a user