added technic-launcher
This commit is contained in:
parent
8db3faafd5
commit
eb93428c47
2 changed files with 63 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ hostname, ... }:
|
{ pkgs, hostname, ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = hostname;
|
networking.hostName = hostname;
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -8,6 +8,16 @@
|
||||||
./printers.nix
|
./printers.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
|
technic-launcher = pkgs.callPackage ../../modules/technic-launcher {};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
technic-launcher
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.gamemode.enable = true;
|
||||||
|
|
||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
services.hardware.bolt.enable = true;
|
services.hardware.bolt.enable = true;
|
||||||
|
|
||||||
|
|
52
modules/technic-launcher/default.nix
Normal file
52
modules/technic-launcher/default.nix
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
makeDesktopItem,
|
||||||
|
symlinkJoin,
|
||||||
|
writeShellScriptBin,
|
||||||
|
gamemode,
|
||||||
|
jdk8,
|
||||||
|
steam-run,
|
||||||
|
withSteamRun ? true,
|
||||||
|
pname ? "technic-launcher",
|
||||||
|
}: let
|
||||||
|
version = "895";
|
||||||
|
src = builtins.fetchurl {
|
||||||
|
url = "https://launcher.technicpack.net/launcher4/${version}/TechnicLauncher.jar";
|
||||||
|
sha256 = "1yvkaam6f8glkv8nv8m7lx2720g1s0yvjggbzpdi98fw5x14mm2l";
|
||||||
|
};
|
||||||
|
|
||||||
|
desktopItems = makeDesktopItem {
|
||||||
|
name = pname;
|
||||||
|
exec = pname;
|
||||||
|
inherit icon;
|
||||||
|
comment = "Technic Platform Launcher";
|
||||||
|
desktopName = "Technic Launcher";
|
||||||
|
categories = ["Game"];
|
||||||
|
};
|
||||||
|
|
||||||
|
icon = builtins.fetchurl {
|
||||||
|
# original url = "https://cdn.freebiesupply.com/logos/large/2x/technic-launcher-logo-png-transparent.png";
|
||||||
|
url = "https://user-images.githubusercontent.com/36706276/203341849-0b049d7a-8c00-4ff1-b916-1a8aacee7ffb.png";
|
||||||
|
sha256 = "0p18sfwaral8f6f5h9r5y9sxrzij2ks9zzyhfmzjldldladrwznq";
|
||||||
|
};
|
||||||
|
|
||||||
|
script = writeShellScriptBin pname ''
|
||||||
|
PATH=$PATH:${gamemode} ${
|
||||||
|
if withSteamRun
|
||||||
|
then "${steam-run}/bin/steam-run"
|
||||||
|
else ""
|
||||||
|
} ${gamemode}/bin/gamemoderun ${jdk8}/bin/java -jar ${src}
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
symlinkJoin {
|
||||||
|
name = "${pname}-${version}";
|
||||||
|
paths = [desktopItems script];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Minecraft Launcher with support for Technic Modpacks";
|
||||||
|
homepage = "https://technicpack.net";
|
||||||
|
license = lib.licenses.unfree;
|
||||||
|
maintainers = with lib.maintainers; [fufexan];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue