You've already forked AstralRinth
forked from didirus/AstralRinth
Initial draft of profile metadata format & CLI (#17)
* Initial draft of profile metadata format * Remove records, add Clippy to Nix, fix Clippy error * Work on profile definition * BREAKING: Make global settings consistent with profile settings * Add builder methods & format * Integrate launching with profiles * Add profile loading * Launching via profile, API tweaks, and yak shaving * Incremental update, committing everything due to personal system maintainance * Prepare for review cycle * Remove reminents of experimental work * CLI: allow people to override the non-empty directory check * Fix mistake in previous commit * Handle trailing whitespace and newlines in prompts * Revamp prompt to use dialoguer and support defaults * Make requested changes
This commit is contained in:
66
flake.nix
Normal file
66
flake.nix
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
description = "The official Modrinth launcher";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
naersk = {
|
||||
url = "github:nix-community/naersk";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fenix = {
|
||||
url = "github:nix-community/fenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
inputs.utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import inputs.nixpkgs { inherit system; };
|
||||
fenix = inputs.fenix.packages.${system};
|
||||
utils = inputs.utils.lib;
|
||||
|
||||
toolchain = with fenix;
|
||||
combine [
|
||||
minimal.rustc minimal.cargo
|
||||
];
|
||||
|
||||
naersk = inputs.naersk.lib.${system}.override {
|
||||
rustc = toolchain;
|
||||
cargo = toolchain;
|
||||
};
|
||||
|
||||
deps = with pkgs; {
|
||||
global = [
|
||||
openssl pkg-config
|
||||
];
|
||||
gui = [
|
||||
gtk4 gdk-pixbuf atk webkitgtk
|
||||
];
|
||||
shell = [
|
||||
toolchain fenix.default.clippy git
|
||||
jdk17 jdk8
|
||||
];
|
||||
};
|
||||
in {
|
||||
packages = {
|
||||
theseus-cli = naersk.buildPackage {
|
||||
pname = "theseus_cli";
|
||||
src = ./.;
|
||||
buildInputs = deps.global;
|
||||
cargoBuildOptions = x: x ++ ["-p" "theseus_cli"];
|
||||
};
|
||||
};
|
||||
|
||||
apps = {
|
||||
theseus-cli = utils.mkApp {
|
||||
drv = inputs.self.packages.${system}.theseus-cli;
|
||||
};
|
||||
};
|
||||
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with deps;
|
||||
global ++ gui ++ shell;
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user