You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.0 KiB
36 lines
1.0 KiB
2 years ago
|
{
|
||
|
inputs = {
|
||
|
naersk.url = "github:nix-community/naersk/master";
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||
|
utils.url = "github:numtide/flake-utils";
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, utils, naersk }:
|
||
|
utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
pkgs = import nixpkgs { inherit system; };
|
||
|
naersk-lib = pkgs.callPackage naersk { };
|
||
|
in
|
||
|
rec {
|
||
|
packages.e4mc-server = naersk-lib.buildPackage {
|
||
|
pname = "e4mc-server";
|
||
|
src = ./.;
|
||
|
};
|
||
|
packages.e4mc-client = naersk-lib.buildPackage {
|
||
|
pname = "e4mc-client";
|
||
|
src = ./.;
|
||
|
};
|
||
|
dockerImage = pkgs.dockerTools.buildImage {
|
||
|
name = "e4mc-server";
|
||
|
tag = "latest";
|
||
|
|
||
|
config = {
|
||
|
Cmd = [ "${packages.e4mc-server}/bin/e4mc-server" ];
|
||
|
};
|
||
|
};
|
||
|
devShell = with pkgs; mkShell {
|
||
|
buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ];
|
||
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
||
|
};
|
||
|
});
|
||
|
}
|