Skip to content

Commit

Permalink
Merge pull request #42 from oatmealine/nix-flake
Browse files Browse the repository at this point in the history
Nix flake
  • Loading branch information
TheAlan404 authored Jan 4, 2024
2 parents 7df3212 + 4d16977 commit c6c7168
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 0 deletions.
78 changes: 78 additions & 0 deletions flake.lock

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

29 changes: 29 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
description = "Powerful Minecraft Server Manager CLI";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
flake-utils.url = "github:numtide/flake-utils";
gitignore = { url = "github:hercules-ci/gitignore.nix"; flake = false; };
};

outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
in rec {
legacyPackages.mcman = pkgs.rustPlatform.buildRustPackage {
inherit (cargoToml.package) name version;
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
cargoLock.outputHashes = {
"mcapi-0.2.0" = "sha256-wHXA+4DQVQpfSCfJLFuc9kUSwyqo6T4o0PypYdhpp5s=";
"pathdiff-0.2.1" = "sha256-+X1afTOLIVk1AOopQwnjdobKw6P8BXEXkdZOieHW5Os=";
"rpackwiz-0.1.0" = "sha256-pOotNPIZS/BXiJWZVECXzP1lkb/o9J1tu6G2OqyEnI8=";
};
};
defaultPackage = legacyPackages.mcman;
}
);
}

0 comments on commit c6c7168

Please sign in to comment.