Compare commits

..

12 Commits

Author SHA1 Message Date
41c49c7ca0
Merge remote-tracking branch 'upstream/develop' into develop
Signed-off-by: sneedium <sneed@sneedmc.org>
2024-06-20 16:37:06 -04:00
Lenny McLennington
b0bf7bd108
Merge pull request #1661 from hustlerone/develop
Include JDK 21 into the nix derivation
2024-06-20 12:52:26 +01:00
Hustler One
2adf3db7bc
DCO Remediation Commit for Hustler One <nine-ball@tutanota.com>
I, Hustler One <nine-ball@tutanota.com>, hereby add my Signed-off-by to this commit: 1b8d45d04f

Signed-off-by: Hustler One <nine-ball@tutanota.com>
2024-06-19 12:06:57 +02:00
Hustler One
1b8d45d04f
fix small oversight for new minecraft versions (JDK 21 is now mandatory for 1.20.5+) 2024-06-19 11:48:43 +02:00
Lenny McLennington
0e73bff14c
Merge pull request #1652 from LordMZTE/nix-wayland
Fix nix package on wayland
2024-06-08 00:14:39 +01:00
Lenny McLennington
62fd3d436a
Merge pull request #1651 from ZebulanStanphill/fix-metainfo
Fix circular dependency and typos in metainfo.
2024-05-02 22:23:24 +01:00
LordMZTE
f2f38691e7
Fix nix package on wayland
The nix package was missing the dependencies required for qtwayland to
work. This has been fixed.

Signed-off-by: LordMZTE <lord@mzte.de>
2024-05-02 16:41:21 +02:00
Zebulan Stanphill
19d34dd302 Fix capitalization and add Oxford commas in metainfo.
Signed-off-by: Zebulan Stanphill <zebulanstanphill@protonmail.com>
2024-04-28 14:51:13 -05:00
Zebulan Stanphill
15df4bb751 Fix recursive dependency in metainfo.
Signed-off-by: Zebulan Stanphill <zebulanstanphill@protonmail.com>
2024-04-28 14:50:29 -05:00
Lenny McLennington
d9760a16f5
Merge pull request #1649 from LordMZTE/nix-fix
fix nix build
2024-04-22 09:05:08 +01:00
LordMZTE
4bbc7bad4c
Fix nix meta
Signed-off-by: LordMZTE <lord@mzte.de>
2024-04-13 14:22:13 +02:00
LordMZTE
1aec41faa1
fix nix build
Signed-off-by: LordMZTE <lord@mzte.de>
2024-04-13 14:21:00 +02:00
7 changed files with 13 additions and 286 deletions

View File

@ -3,11 +3,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
@ -34,11 +34,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1658119717,
"narHash": "sha256-4upOZIQQ7Bc4CprqnHsKnqYfw+arJeAuU+QcpjYBXW0=",
"lastModified": 1712129508,
"narHash": "sha256-FBVpEX0eLiqX3jnSL3rmJHqHhbuCikJZyDyV3Cl3qAY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9eb60f25aff0d2218c848dd4574a0ab5e296cabe",
"rev": "d03a4482228d4d6dbd2d4b425b6dfcd49ebe765f",
"type": "github"
},
"original": {
@ -59,11 +59,11 @@
"tomlplusplus": {
"flake": false,
"locked": {
"lastModified": 1664034574,
"narHash": "sha256-EFMAl6tsTvkgK0DWC/pZfOIq06b2e5SnxJa1ngGRIQA=",
"lastModified": 1710824845,
"narHash": "sha256-A9XuCfVcLle/tMNaH7aqb1leM+t3wwC9ER5RIbMMovo=",
"owner": "marzer",
"repo": "tomlplusplus",
"rev": "8aa5c8b2a4ff2c440d4630addf64fa4f62146170",
"rev": "1f7884e59165e517462f922e7b6de131bd9844f3",
"type": "github"
},
"original": {

View File

@ -1,45 +0,0 @@
{
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}; };
};
}

View File

@ -1,32 +0,0 @@
# 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 ];
```

View File

@ -1,98 +0,0 @@
{ 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 ];
};
}

View File

@ -1,9 +0,0 @@
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 = ../.; }

View File

@ -1,89 +0,0 @@
{ 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 ];
};
}

View File

@ -6,7 +6,7 @@
</provides>
<launchable type="desktop-id">org.sneederix.SneedMC.desktop</launchable>
<name>SneedMC</name>
<developer_name>SneedMC Team</developer_name>
<developer_name>Sneederix</developer_name>
<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>
<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>Features:</p>
<ul>
<li>Easily install game modifications, such as Fabric, Forge and Quilt</li>
<li>Control your java settings</li>
<li>Easily install game modifications, such as Fabric, Forge, and Quilt</li>
<li>Control your Java settings</li>
<li>Manage worlds and resource packs from the launcher</li>
<li>See logs and other details easily</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>
</ul>
</description>