Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ To make changes locally, follow these steps:
1. Clone the repository: `git clone https://github.com/Polyfrost/OneLauncher`
2. Navigate to the project directory: `cd OneLauncher`
3. Configure your system environment for OneLauncher development:
1. For Linux users, run: `./packages/scripts/setup.sh`
> The [Unix script] will check if Rust and pnpm are installed then proceed to install Clang, NASM, LLVM, libvips, [Tauri essentials] and any other required dependencies for OneLauncher to build.
1. Linux:
1. NixOS: Please use `nix develop`
2. For Other Linux users, run: `./packages/scripts/setup.sh`
> The [Unix script] will check if Rust and pnpm are installed then proceed to install Clang, NASM, LLVM, libvips, [Tauri essentials] and any other required dependencies for OneLauncher to build.
2. For macOS users, run: `./packages/scripts/setup.sh`
> The [Unix script] will check if Rust, pnpm and Xcode are installed and proceed to use Homebrew to install NASM, [Tauri essentials] and install any other required dependencies for OneLauncher to build.
3. For Windows users, run in PowerShell: `powershell -ExecutionPolicy Bypass -File .\packages\scripts\setup.ps1`
Expand Down
98 changes: 98 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

80 changes: 74 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,81 @@
{
description = "Next-generation open source Minecraft launcher";

inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
inputs.crane.url = "github:ipetkov/crane";
inputs = {
nixpkgs = {
url = "github:nixos/nixpkgs/nixos-unstable";
};

flake-parts = {
url = "github:hercules-ci/flake-parts";
};

crane = {
url = "github:ipetkov/crane";
};

rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs = {
follows = "nixpkgs";
};
};
};
};

outputs = inputs@{ flake-parts, ... }:
outputs =
inputs@{ flake-parts, rust-overlay, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
perSystem = { config, pkgs, ... }: {};
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];

perSystem =
{ pkgs, system, ... }:
let
pkgs' = import inputs.nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
in
{
devShells.default = pkgs'.mkShell {
packages = with pkgs'; [
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)

cargo-tauri
nodejs_24
pnpm
eslint
typescript

pkg-config
openssl

gobject-introspection
at-spi2-atk
atkmm
cairo
gdk-pixbuf
glib
gtk3
harfbuzz
librsvg
libsoup_3
pango
webkitgtk_4_1
];

shellHook = ''
export GIO_MODULE_DIR="${pkgs.glib-networking}/lib/gio/modules/"
pnpm i
pnpm prep
'';
};
};
};
}
Loading