Compare commits
No commits in common. "41c49c7ca075b28255bdaeeb1635979e60e4f2bb" and "bc1c592f411fad8287c6e50308b4bce6bedfe8b6" have entirely different histories.
41c49c7ca0
...
bc1c592f41
18
flake.lock
18
flake.lock
@ -3,11 +3,11 @@
|
|||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1650374568,
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -34,11 +34,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1712129508,
|
"lastModified": 1658119717,
|
||||||
"narHash": "sha256-FBVpEX0eLiqX3jnSL3rmJHqHhbuCikJZyDyV3Cl3qAY=",
|
"narHash": "sha256-4upOZIQQ7Bc4CprqnHsKnqYfw+arJeAuU+QcpjYBXW0=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f",
|
"rev": "9eb60f25aff0d2218c848dd4574a0ab5e296cabe",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -59,11 +59,11 @@
|
|||||||
"tomlplusplus": {
|
"tomlplusplus": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710824845,
|
"lastModified": 1664034574,
|
||||||
"narHash": "sha256-A9XuCfVcLle/tMNaH7aqb1leM+t3wwC9ER5RIbMMovo=",
|
"narHash": "sha256-EFMAl6tsTvkgK0DWC/pZfOIq06b2e5SnxJa1ngGRIQA=",
|
||||||
"owner": "marzer",
|
"owner": "marzer",
|
||||||
"repo": "tomlplusplus",
|
"repo": "tomlplusplus",
|
||||||
"rev": "1f7884e59165e517462f922e7b6de131bd9844f3",
|
"rev": "8aa5c8b2a4ff2c440d4630addf64fa4f62146170",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
45
flake.nix
Normal file
45
flake.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
description = "A sneedful launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
|
||||||
|
libnbtplusplus = { url = "github:PolyMC/libnbtplusplus"; flake = false; };
|
||||||
|
tomlplusplus = { url = "github:marzer/tomlplusplus"; flake = false; };
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, libnbtplusplus, tomlplusplus, ... }:
|
||||||
|
let
|
||||||
|
# User-friendly version number.
|
||||||
|
version = builtins.substring 0 8 self.lastModifiedDate;
|
||||||
|
|
||||||
|
# Supported systems (qtbase is currently broken for "aarch64-darwin")
|
||||||
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
|
||||||
|
|
||||||
|
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
|
||||||
|
# Nixpkgs instantiated for supported systems.
|
||||||
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
|
||||||
|
packagesFn = pkgs: rec {
|
||||||
|
polymc = pkgs.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
||||||
|
polymc-qt6 = pkgs.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus tomlplusplus; };
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages = forAllSystems (system: rec {
|
||||||
|
sneedmc = pkgs.${system}.libsForQt5.callPackage ./nix { inherit version self libnbtplusplus; };
|
||||||
|
sneedmc-qt6 = pkgs.${system}.qt6Packages.callPackage ./nix { inherit version self libnbtplusplus; };
|
||||||
|
|
||||||
|
default = sneedmc;
|
||||||
|
});
|
||||||
|
|
||||||
|
defaultPackage = forAllSystems (system: self.packages.${system}.default);
|
||||||
|
|
||||||
|
apps = forAllSystems (system: rec { sneedmc = { type = "app"; program = "${self.defaultPackage.${system}}/bin/sneedmc"; }; default = sneedmc; });
|
||||||
|
defaultApp = forAllSystems (system: self.apps.${system}.default);
|
||||||
|
|
||||||
|
overlay = final: prev: { sneedmc = self.defaultPackage.${final.system}; };
|
||||||
|
};
|
||||||
|
}
|
32
nix/NIX.md
Normal file
32
nix/NIX.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# How to import
|
||||||
|
|
||||||
|
To import with flakes use
|
||||||
|
|
||||||
|
```nix
|
||||||
|
inputs = {
|
||||||
|
sneedmc.url = "github:Sneederix/SneedMC";
|
||||||
|
};
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
|
nixpkgs.overlays = [ inputs.sneedmc.overlay ]; ## Within configuration.nix
|
||||||
|
environment.systemPackages = with pkgs; [ sneedmc ]; ##
|
||||||
|
```
|
||||||
|
|
||||||
|
To import without flakes use channels:
|
||||||
|
|
||||||
|
```
|
||||||
|
nix-channel --add https://github.com/Sneederix/SneedMC/archive/master.tar.gz sneedmc
|
||||||
|
nix-channel --update sneedmc
|
||||||
|
nix-env -iA sneedmc
|
||||||
|
```
|
||||||
|
|
||||||
|
or alternatively you can use
|
||||||
|
|
||||||
|
```
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(import (builtins.fetchTarball "https://github.com/Sneederix/SneedMC/archive/develop.tar.gz")).overlay
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ sneedmc ];
|
||||||
|
```
|
98
nix/default.nix
Normal file
98
nix/default.nix
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, ninja
|
||||||
|
, jdk8
|
||||||
|
, jdk
|
||||||
|
, ghc_filesystem
|
||||||
|
, zlib
|
||||||
|
, file
|
||||||
|
, wrapQtAppsHook
|
||||||
|
, xorg
|
||||||
|
, libpulseaudio
|
||||||
|
, qtbase
|
||||||
|
, quazip
|
||||||
|
, libGL
|
||||||
|
, msaClientID ? ""
|
||||||
|
, extraJDKs ? [ ]
|
||||||
|
, extra-cmake-modules
|
||||||
|
, qtcharts
|
||||||
|
# flake
|
||||||
|
, self
|
||||||
|
, version
|
||||||
|
, libnbtplusplus
|
||||||
|
, tomlplusplus
|
||||||
|
, enableLTO ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Libraries required to run Minecraft
|
||||||
|
libpath = with xorg; lib.makeLibraryPath [
|
||||||
|
libX11
|
||||||
|
libXext
|
||||||
|
libXcursor
|
||||||
|
libXrandr
|
||||||
|
libXxf86vm
|
||||||
|
libpulseaudio
|
||||||
|
libGL
|
||||||
|
];
|
||||||
|
|
||||||
|
# This variable will be passed to Minecraft by SneedMC
|
||||||
|
gameLibraryPath = libpath + ":/run/opengl-driver/lib";
|
||||||
|
|
||||||
|
javaPaths = lib.makeSearchPath "bin/java" ([ jdk jdk8 ] ++ extraJDKs);
|
||||||
|
in
|
||||||
|
|
||||||
|
mkDerivation rec {
|
||||||
|
pname = "sneedmc";
|
||||||
|
version = "nightly";
|
||||||
|
|
||||||
|
src = lib.cleanSource self;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake extra-cmake-modules ninja jdk ghc_filesystem file wrapQtAppsHook ];
|
||||||
|
buildInputs = [ qtbase quazip zlib qtcharts ];
|
||||||
|
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
# Copy libnbtplusplus
|
||||||
|
rm -rf source/libraries/libnbtplusplus
|
||||||
|
mkdir source/libraries/libnbtplusplus
|
||||||
|
cp -a ${libnbtplusplus}/* source/libraries/libnbtplusplus
|
||||||
|
chmod a+r+w source/libraries/libnbtplusplus/*
|
||||||
|
# Copy tomlplusplus
|
||||||
|
rm -rf source/libraries/tomlplusplus
|
||||||
|
mkdir source/libraries/tomlplusplus
|
||||||
|
cp -a ${tomlplusplus}/* source/libraries/tomlplusplus
|
||||||
|
chmod a+r+w source/libraries/tomlplusplus/*
|
||||||
|
'';
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-GNinja"
|
||||||
|
"-DLauncher_QT_VERSION_MAJOR=${lib.versions.major qtbase.version}"
|
||||||
|
] ++ lib.optionals enableLTO [ "-DENABLE_LTO=on" ]
|
||||||
|
++ lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
|
||||||
|
|
||||||
|
# we have to check if the system is NixOS before adding stdenv.cc.cc.lib (#923)
|
||||||
|
postInstall = ''
|
||||||
|
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||||
|
wrapQtApp $out/bin/sneedmc \
|
||||||
|
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
|
||||||
|
--prefix POLYMC_JAVA_PATHS : ${javaPaths} \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://sneedmc.org/";
|
||||||
|
description = "A free, open source launcher for Minecraft";
|
||||||
|
longDescription = ''
|
||||||
|
Allows you to have multiple, separate instances of Minecraft (each with
|
||||||
|
their own mods, texture packs, saves, etc) and helps you manage them and
|
||||||
|
their associated options with a simple interface.
|
||||||
|
'';
|
||||||
|
platforms = platforms.unix;
|
||||||
|
license = licenses.gpl3Only;
|
||||||
|
maintainers = with maintainers; [ starcraft66 kloenk ];
|
||||||
|
};
|
||||||
|
}
|
9
nix/flake-compat.nix
Normal file
9
nix/flake-compat.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
let
|
||||||
|
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
||||||
|
inherit (lock.nodes.flake-compat.locked) rev narHash;
|
||||||
|
flake-compat = fetchTarball {
|
||||||
|
url = "https://github.com/edolstra/flake-compat/archive/${rev}.tar.gz";
|
||||||
|
sha256 = narHash;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
import flake-compat { src = ../.; }
|
89
nix/sneedmc/default.nix
Normal file
89
nix/sneedmc/default.nix
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
{ stdenv
|
||||||
|
, lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, ninja
|
||||||
|
, jdk8
|
||||||
|
, jdk
|
||||||
|
, zlib
|
||||||
|
, file
|
||||||
|
, wrapQtAppsHook
|
||||||
|
, xorg
|
||||||
|
, libpulseaudio
|
||||||
|
, qtbase
|
||||||
|
, quazip
|
||||||
|
, libGL
|
||||||
|
, msaClientID ? ""
|
||||||
|
, extraJDKs ? [ ]
|
||||||
|
|
||||||
|
# flake
|
||||||
|
, self
|
||||||
|
, version
|
||||||
|
, libnbtplusplus
|
||||||
|
, enableLTO ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
# Libraries required to run Minecraft
|
||||||
|
libpath = with xorg; lib.makeLibraryPath [
|
||||||
|
libX11
|
||||||
|
libXext
|
||||||
|
libXcursor
|
||||||
|
libXrandr
|
||||||
|
libXxf86vm
|
||||||
|
libpulseaudio
|
||||||
|
libGL
|
||||||
|
];
|
||||||
|
|
||||||
|
# This variable will be passed to Minecraft by SneedMC
|
||||||
|
gameLibraryPath = libpath + ":/run/opengl-driver/lib";
|
||||||
|
|
||||||
|
javaPaths = lib.makeSearchPath "bin/java" ([ jdk jdk8 ] ++ extraJDKs);
|
||||||
|
in
|
||||||
|
|
||||||
|
mkDerivation rec {
|
||||||
|
pname = "sneedmc";
|
||||||
|
version = "nightly";
|
||||||
|
|
||||||
|
src = lib.cleanSource self;
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake ninja jdk file wrapQtAppsHook ];
|
||||||
|
buildInputs = [ qtbase quazip zlib ];
|
||||||
|
|
||||||
|
dontWrapQtApps = true;
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
# Copy libnbtplusplus
|
||||||
|
rm -rf source/libraries/libnbtplusplus
|
||||||
|
mkdir source/libraries/libnbtplusplus
|
||||||
|
cp -a ${libnbtplusplus}/* source/libraries/libnbtplusplus
|
||||||
|
chmod a+r+w source/libraries/libnbtplusplus/*
|
||||||
|
'';
|
||||||
|
|
||||||
|
cmakeFlags = [
|
||||||
|
"-GNinja"
|
||||||
|
"-DLauncher_QT_VERSION_MAJOR=${lib.versions.major qtbase.version}"
|
||||||
|
] ++ lib.optionals enableLTO [ "-DENABLE_LTO=on" ]
|
||||||
|
++ lib.optionals (msaClientID != "") [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# xorg.xrandr needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||||
|
wrapQtApp $out/bin/sneedmc \
|
||||||
|
--set GAME_LIBRARY_PATH ${gameLibraryPath} \
|
||||||
|
--prefix POLYMC_JAVA_PATHS : ${javaPaths} \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ xorg.xrandr ]}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "https://sneedmc.org/";
|
||||||
|
description = "A free, open source launcher for Minecraft";
|
||||||
|
longDescription = ''
|
||||||
|
Allows you to have multiple, separate instances of Minecraft (each with
|
||||||
|
their own mods, texture packs, saves, etc) and helps you manage them and
|
||||||
|
their associated options with a simple interface.
|
||||||
|
'';
|
||||||
|
platforms = platforms.unix;
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
maintainers = with maintainers; [ starcraft66 kloenk ];
|
||||||
|
};
|
||||||
|
}
|
@ -6,7 +6,7 @@
|
|||||||
</provides>
|
</provides>
|
||||||
<launchable type="desktop-id">org.sneederix.SneedMC.desktop</launchable>
|
<launchable type="desktop-id">org.sneederix.SneedMC.desktop</launchable>
|
||||||
<name>SneedMC</name>
|
<name>SneedMC</name>
|
||||||
<developer_name>Sneederix</developer_name>
|
<developer_name>SneedMC Team</developer_name>
|
||||||
<summary>A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once</summary>
|
<summary>A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once</summary>
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>GPL-3.0-or-later</project_license>
|
<project_license>GPL-3.0-or-later</project_license>
|
||||||
@ -16,12 +16,12 @@
|
|||||||
<p>SneedMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.</p>
|
<p>SneedMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.</p>
|
||||||
<p>Features:</p>
|
<p>Features:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Easily install game modifications, such as Fabric, Forge, and Quilt</li>
|
<li>Easily install game modifications, such as Fabric, Forge and Quilt</li>
|
||||||
<li>Control your Java settings</li>
|
<li>Control your java settings</li>
|
||||||
<li>Manage worlds and resource packs from the launcher</li>
|
<li>Manage worlds and resource packs from the launcher</li>
|
||||||
<li>See logs and other details easily</li>
|
<li>See logs and other details easily</li>
|
||||||
<li>Kill Minecraft in case of a crash/freeze</li>
|
<li>Kill Minecraft in case of a crash/freeze</li>
|
||||||
<li>Isolate Minecraft instances to keep everything clean</li>
|
<li>Isolate minecraft instances to keep everything clean</li>
|
||||||
<li>Install and update mods directly from the launcher</li>
|
<li>Install and update mods directly from the launcher</li>
|
||||||
</ul>
|
</ul>
|
||||||
</description>
|
</description>
|
||||||
|
Loading…
Reference in New Issue
Block a user