-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
61 lines (55 loc) · 1.31 KB
/
Copy pathflake.nix
File metadata and controls
61 lines (55 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
{ self, nixpkgs }:
let
lib = nixpkgs.lib;
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
in
{
packages = lib.genAttrs supportedSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.rustPlatform.buildRustPackage {
pname = "mcserver";
version = "0.2.7";
cargoLock.lockFile = ./Cargo.lock;
src = lib.cleanSource ./.;
nativeBuildInputs = with pkgs; [
pkg-config
];
buildInputs = with pkgs; [
openssl
mcrcon
];
};
}
);
devShells = lib.genAttrs supportedSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
# A recent stable rust toolchain will be added
inputsFrom = [ self.packages.${system}.default ];
nativeBuildInputs = with pkgs; [
rust-analyzer
];
};
}
);
};
}