mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
it is gone for good, i made the new registry be parsed from compile time in pumpkin-nbt and even parse the nbt code at compile time as well, And like expected this gives a massive speedup in first time parsing and also decreased bin size
79 lines
1.8 KiB
Nix
79 lines
1.8 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
|
|
|
|
naersk = {
|
|
url = "github:nix-community/naersk";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
inputs@{
|
|
flake-parts,
|
|
naersk,
|
|
nixpkgs,
|
|
...
|
|
}:
|
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
|
systems = nixpkgs.lib.systems.flakeExposed;
|
|
|
|
perSystem =
|
|
{
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
naersk' = pkgs.callPackage naersk { };
|
|
|
|
manifest = (lib.importTOML ./pumpkin/Cargo.toml).package;
|
|
workspace-manifest = (lib.importTOML ./Cargo.toml).workspace.package;
|
|
in
|
|
{
|
|
packages.default = naersk'.buildPackage {
|
|
pname = manifest.name;
|
|
inherit (workspace-manifest) version;
|
|
|
|
nativeBuildInputs = [ pkgs.rustfmt ];
|
|
|
|
src = lib.fileset.toSource {
|
|
root = ./.;
|
|
fileset = lib.fileset.unions [
|
|
./Cargo.lock
|
|
./Cargo.toml
|
|
|
|
./assets
|
|
./pumpkin
|
|
./pumpkin-api-macros
|
|
./pumpkin-config
|
|
./pumpkin-data
|
|
./pumpkin-inventory
|
|
./pumpkin-macros
|
|
./pumpkin-nbt
|
|
./pumpkin-protocol
|
|
./pumpkin-util
|
|
./pumpkin-world
|
|
];
|
|
};
|
|
};
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
cargo
|
|
clippy
|
|
rust-analyzer
|
|
rustc
|
|
rustfmt
|
|
];
|
|
};
|
|
|
|
formatter = pkgs.nixfmt-tree;
|
|
};
|
|
};
|
|
}
|