Merge pull request #112 from muscaln/flake

Nix updates
This commit is contained in:
swirl 2022-01-30 11:32:49 -05:00 committed by GitHub
commit b925338688
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 24 deletions

12
flake.lock generated
View File

@ -18,11 +18,11 @@
},
"flake-utils": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
@ -49,11 +49,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1641887635,
"narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=",
"lastModified": 1643169865,
"narHash": "sha256-+KIpNRazbc8Gac9jdWCKQkFv9bjceaLaLhlwqUEYu8c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88",
"rev": "945ec499041db73043f745fad3b2a3a01e826081",
"type": "github"
},
"original": {

View File

@ -1,7 +1,6 @@
{ lib
, mkDerivation
, fetchFromGitHub
, makeDesktopItem
, cmake
, ninja
, jdk8
@ -73,27 +72,11 @@ mkDerivation rec {
"-DLauncher_LAYOUT=lin-system"
];
desktopItem = makeDesktopItem {
name = "polymc";
exec = "polymc";
icon = "polymc";
desktopName = "PolyMC";
genericName = "Minecraft Launcher";
comment = "A custom launcher for Minecraft";
categories = "Game;";
extraEntries = ''
Keywords=game;Minecraft;
'';
};
postInstall = ''
install -Dm644 ../launcher/resources/multimc/scalable/launcher.svg $out/share/pixmaps/polymc.svg
install -Dm644 ${desktopItem}/share/applications/polymc.desktop $out/share/applications/org.polymc.polymc.desktop
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
wrapProgram $out/bin/polymc \
"''${qtWrapperArgs[@]}" \
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr jdk ]}
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
'';
}