-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
53 lines (42 loc) · 1.14 KB
/
flake.nix
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
{
description = "Minecraft Server Scanner Honeypot";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
};
outputs = { self, nixpkgs, crane, ... }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
craneLib = crane.mkLib pkgs;
commonArgs = {
src = craneLib.cleanCargoSource ./.;
#strictDeps = true;
buildInputs = with pkgs; [
openssl
pkg-config
];
};
mc-honeypot = craneLib.buildPackage (commonArgs // {
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
#OPENSSL_DIR = "${pkgs.openssl}/etc/ssl";
#PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
});
in {
checks.${system} = {
inherit mc-honeypot;
};
packages.${system} = {
mc-honeypot = mc-honeypot;
default = mc-honeypot;
};
nixosModules.default = import ./. {
inherit (nixpkgs) lib;
selfpkgs = self.packages.${system};
};
devShells.${system}.default = craneLib.devShell {
# Inherit inputs from checks.
checks = self.checks.${system};
};
};
}