mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
add minecraft-atlauncher
This commit is contained in:
parent
1d3cc23be4
commit
2f41e3570e
1 changed files with 22 additions and 0 deletions
22
pkgs/minecraft-atlauncher/default.nix
Normal file
22
pkgs/minecraft-atlauncher/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ fetchurl, writeShellScript, jre8, buildFHSUserEnv }:
|
||||||
|
let
|
||||||
|
name = "minecraft-atlauncher";
|
||||||
|
version = "3.4.0.2";
|
||||||
|
|
||||||
|
atJar = fetchurl {
|
||||||
|
url = "https://github.com/ATLauncher/ATLauncher/releases/download/${version}/ATLauncher-${version}.jar";
|
||||||
|
sha256 = "5bf55ba0134e2bfbd99cf1b720cf24eb296bf2875af117fd6a845f5a408a60f4";
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
buildFHSUserEnv {
|
||||||
|
inherit name;
|
||||||
|
targetPkgs = pkgs: [ pkgs.alsaLib ];
|
||||||
|
runScript = writeShellScript name ''
|
||||||
|
set -ex
|
||||||
|
installPath=~/.atlauncher
|
||||||
|
mkdir -p "$installPath"
|
||||||
|
cd "$installPath"
|
||||||
|
exec ${jre8}/bin/java -jar "${atJar}" --working-dir "$installPath"
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue