diff --git a/flake.lock b/flake.lock index a72286bb..5a12e61a 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/flake.nix b/flake.nix deleted file mode 100644 index ced9e720..00000000 --- a/flake.nix +++ /dev/null @@ -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}; }; - }; -} diff --git a/nix/NIX.md b/nix/NIX.md deleted file mode 100644 index f4166741..00000000 --- a/nix/NIX.md +++ /dev/null @@ -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 ]; -``` diff --git a/nix/default.nix b/nix/default.nix deleted file mode 100644 index be54026c..00000000 --- a/nix/default.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/nix/flake-compat.nix b/nix/flake-compat.nix deleted file mode 100644 index 8b6cb99c..00000000 --- a/nix/flake-compat.nix +++ /dev/null @@ -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 = ../.; } diff --git a/nix/sneedmc/default.nix b/nix/sneedmc/default.nix deleted file mode 100644 index 0b756eec..00000000 --- a/nix/sneedmc/default.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/program_info/org.sneederix.SneedMC.metainfo.xml.in b/program_info/org.sneederix.SneedMC.metainfo.xml.in index 42427e9c..45b2435e 100644 --- a/program_info/org.sneederix.SneedMC.metainfo.xml.in +++ b/program_info/org.sneederix.SneedMC.metainfo.xml.in @@ -6,7 +6,7 @@ org.sneederix.SneedMC.desktop SneedMC - SneedMC Team + Sneederix A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once CC0-1.0 GPL-3.0-or-later @@ -16,12 +16,12 @@

SneedMC is a custom launcher for Minecraft that focuses on predictability, long term stability and simplicity.

Features: