zastąpienie kitty przez warp, zainstalowanie freetube, próba instalacji klienta minecraft.
This commit is contained in:
78
packages/crystal-launcher.nix
Normal file
78
packages/crystal-launcher.nix
Normal file
@@ -0,0 +1,78 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
makeWrapper,
|
||||
bash,
|
||||
curl,
|
||||
wget,
|
||||
xorg,
|
||||
host,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "crystal-launcher";
|
||||
version = "1.0.0"; # możesz zaktualizować wersję, jeśli ją znasz
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://launcher.crystal-launcher.net/linux/launcher.tar.xz";
|
||||
sha256 = "sha256-NkngV1nH5oYP7wRUAuDylRkne0Q65FmHn0mnlibjV0c="; # uzupełnij po pierwszym uruchomieniu - Nix podpowie prawidłowy hash
|
||||
};
|
||||
|
||||
icon = fetchurl {
|
||||
url = "https://launcher.crystal-launcher.net/linux/icon.png";
|
||||
sha256 = "sha256-IU9PEut3LSzpRXI6t7Emsfs+eMAJ9BMtaw+Y6iJwqww="; # uzupełnij po pierwszym uruchomieniu - Nix podpowie prawidłowy hash
|
||||
};
|
||||
|
||||
nativeBuildInputs = [makeWrapper];
|
||||
buildInputs = [bash wget curl xorg.xrdb];
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/applications
|
||||
mkdir -p $out/share/crystal-launcher/pybootstrap
|
||||
|
||||
# Rozpakuj archiwum
|
||||
tar -xf $src -C $out/share/crystal-launcher/pybootstrap
|
||||
|
||||
# Skopiuj ikonę
|
||||
cp $icon $out/share/crystal-launcher/pybootstrap/icon.png
|
||||
|
||||
# Utwórz skrypt uruchamiający
|
||||
cat > $out/bin/crystal-launcher << EOF
|
||||
#!/bin/sh
|
||||
|
||||
# manjaro fix
|
||||
xrdb -load /dev/null
|
||||
xrdb -query
|
||||
|
||||
cd $out/share/crystal-launcher && ./pybootstrap/launcher
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/crystal-launcher
|
||||
|
||||
# Utwórz plik .desktop
|
||||
cat > $out/share/applications/CrystalLauncher.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=Crystal Launcher
|
||||
GenericName=CrystalLauncher
|
||||
Comment=A Minecraft modpack launcher
|
||||
Exec=$out/bin/crystal-launcher
|
||||
Icon=$out/share/crystal-launcher/pybootstrap/icon.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Game;
|
||||
EOF
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Minecraft modpack launcher";
|
||||
homepage = "https://launcher.crystal-launcher.net/";
|
||||
license = licenses.unfree; # dostosuj do właściwej licencji
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [
|
||||
host
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user